Hi, Im trying to index a folder of json files. Can I index the attributes separately? Or does everything go into the context?
Json Format:
{
“id”: “000897386”,
“jsonData”: {
“id”: “000897386”,
“numeroProcesso”: “2655010”,
“numeroRegistro”: “202401928697”,
“siglaClasse”: “AgInt no AREsp”,
“descricaoClasse”: “AGRAVO INTERNO”,
“nomeOrgaoJulgador”: “PRIMEIRA”,
“ministroRelator”: “DE FARIA”,
“dataPublicacao”: “DJEN DATA:03/02/2025”,
“ementa”: “PROCESSUAL CIVIL E TRIBUTÁRIO. RECURSO ESPECIAL. NEGATIVA DE\nPRESTAÇÃO JURISDICIONAL. INOCORRÊNCIA. FUNDAMENTO INATACADO.\nDEFICIÊNCIA. EXECUÇÃO FISCAL. PRESCRIÇÃO INTERCORRENTE. ACÓRDÃO\nCONFORME A JURISPRUDÊNCIA DO STJ. PARALISAÇÃO DO PROCESSO.\nRESPONSABILIDADE. VERIFICAÇÃO. REEXAME DE PROVA. IMPOSSIBILIDADE.\n1. Inexiste ofensa aos arts. 489, § 1º, e 1.022 do CPC/2015 quando o\nTribunal de origem se manifesta de modo fundamentado acerca das\nquestões que lhe foram submetidas, apreciando integralmente a\ncontrovérsia posta nos autos, porquanto julgamento desfavorável ao\ninteresse da parte não se confunde com negativa ou ausência de\nprestação jurisdicional.\n2. Conforme entendimento sedimentado na Súmula 283 do STF, não se\nconhece de recurso especial quando inexistente impugnação específica\na fundamento autônomo adotado pelo órgão judicial a quo.\n3. A conformidade do acórdão recorrido com a orientação\njurisprudencial firmada no julgamento do Recurso Especial repetitivo\nn. 1.340.553/RS, segundo a qual a intimação do exequente sobre a\nnão localização de bens penhoráveis é pressuposto para o início da\ncontagem do prazo de um ano de suspensão do processo e, findo esse,\nda prescrição intercorrente, enseja a aplicação do óbice de\nconhecimento estampado na Súmula 83 do STJ.\n4. A revisão do acórdão recorrido na parte em que atribui à maquina\njudiciária a responsabilidade pela paralisação do processo\npressupõe, in casu, reexame de prova, o que é inviável no âmbito do\nrecurso especial, nos termos da Súmula 7 do STJ.\n5. Agravo interno desprovido.”,
“tipoDeDecisao”: “ACÓRDÃO”,
“dataDecisao”: “2024-12-16”,
“decisao”: “Vistos e relatados estes autos em que são partes as acima\nindicadas, acordam os,\nnegar provimento ao recurso, nos termos do voto do Sr. Ministro\nRelator.\nOs Srs. Ministros Benedito Gonçalves, Sérgio Kukina, Regina Helena\nCosta e Paulo Sérgio Domingues votaram com o Sr. Ministro Relator.\nPresidiu o julgamento o Sr. Ministro Paulo Sérgio Domingues.”,
“jurisprudenciaCitada”: null,
“notas”: null,
“informacoesComplementares”: “Aguardando análise.”,
“termosAuxiliares”: null,
“teseJuridica”: null,
“tema”: null,
“referenciasLegislativas”: ,
“acordaosSimilares”: [
“AgInt no AREsp 2744938 MA 2024/0346196-5 Decisão:24/02/2025\nDJEN DATA:05/03/2025”,
“AgInt nos EDcl no AREsp 2381812 SP 2023/0183657-3 Decisão:17/02/2025\nDJEN DATA:21/02/2025”,
“AgInt no AREsp 2108701 SP 2022/0110880-0 Decisão:16/12/2024\nDJEN DATA:03/02/2025”,
“AgInt no AREsp 2322670 RJ 2023/0085614-3 Decisão:16/12/2024\nDJEN DATA:03/02/2025”,
“AgInt no AREsp 2375382 SP 2023/0168029-9 Decisão:16/12/2024\nDJEN DATA:03/02/2025”,
“AgInt no AREsp 2433879 SP 2023/0259196-4 Decisão:16/12/2024\nDJEN DATA:03/02/2025”,
“AgInt no AREsp 2487798 SP 2023/0389837-2 Decisão:16/12/2024\nDJEN DATA:03/02/2025”,
“AgInt no AREsp 2543467 RS 2024/0004703-4 Decisão:16/12/2024\nDJEN DATA:03/02/2025”,
“AgInt no AREsp 2549448 RS 2024/0010446-6 Decisão:16/12/2024\nDJEN DATA:03/02/2025”,
“AgInt no AREsp 2582710 RS 2024/0069719-0 Decisão:16/12/2024\nDJEN DATA:03/02/2025”,
“AgInt no AREsp 2674105 SP 2024/0226119-5 Decisão:16/12/2024\nDJEN DATA:03/02/2025”,
“AgInt no AREsp 2676888 MA 2024/0230851-4 Decisão:16/12/2024\nDJEN DATA:03/02/2025”,
“AgInt no AREsp 2688643 RS 2024/0252501-2 Decisão:16/12/2024\nDJEN DATA:03/02/2025”,
“AgInt no REsp 2166625 SC 2024/0322205-1 Decisão:16/12/2024\nDJEN DATA:03/02/2025”,
“AgInt nos EDcl no AREsp 2367660 SP 2023/0164857-4 Decisão:16/12/2024\nDJEN DATA:03/02/2025”,
“AgInt nos EDcl no AREsp 2667515 SP 2024/0213544-3 Decisão:16/12/2024\nDJEN DATA:04/02/2025”,
“AgInt nos EDcl no REsp 2133592 RJ 2024/0112911-5 Decisão:16/12/2024\nDJEN DATA:03/02/2025”
]
}
}
You can index JSON files with individual field mapping using the fess-ds-json plugin and Data Store Crawling.
Setup
- Install the fess-ds-json plugin
- Go to Administration > Data Store Crawling and create a new configuration
- Select JsonDataStore as the Handler Name
Parameter Settings
In the parameter field, specify the path to your JSON/JSONL files:
directories=/path/to/your/json/files/
or for specific files:
files=/path/to/file1.json,/path/to/file2.jsonl
Script Settings (Field Mapping)
In the script field, you can map each JSON attribute to a Fess index field individually. For your data structure, the configuration would look like:
url=“https://your-site.com/processo/” + id
title=numeroProcesso
content=ementa + " " + decisao
digest=ementa
Each line maps a Fess field (left side) to a Groovy expression (right side) that references your JSON fields. You can access nested fields using dot notation (e.g., acordaosSimilares.someField).
This means your JSON attributes are not merged into a single text automatically — you have full control over which fields go where through the script settings.
If you want to store additional custom fields (beyond the standard url, title, content, digest), you can add custom fields to the OpenSearch schema and map them in the script as well.
Thank you, it worked. Which file should I change on opensearch schema? If I change fess.2026… in the next reindex it would overwrite and erase the custom fields, right ?