## 2 Background
### Case Study
In addition, the company names returned after the search was protected and named with <blind name>. The system returns ten search results per page, and for each of them, we have the options of process data, related documents, summaries (summary of a decision), verbatim (sequence of key words, or expressions indicating the subject discussed in the text), device (rule resulting from the judgment), and conclusion (final decision), depending on the document type searched and the collection it belongs. Moreover, the user can add the search to a knowledge basket, available for future searches. Algorithm 1 presents the code for this search. ```
Result: Write here the result procedure sendGetDocuments(\(RESTAPISERVER,TEXT\)) \(TEXT\gets adjustSearchText(TEXT)\); \(TEXT\gets addFilterTwo(TEXT)\); \(FIELD\leftarrow\)\"\(content\)\"; \(FQS\gets createFQs()\) ; \(ROWS\gets getTotalRowsQty()\); \(SORT\leftarrow getSortModel()\); ifgetCurrentCollection() =\"jurisprudence\" OR \"technicalReport\"then ifisProcessNumber(TEXT)then \(FIELD\leftarrow\)\"\(processNumber\)\"; \(TEXT\gets clearProcessNumber(TEXT)\); else \(TEXT\gets switchSpecials(TEXT)\);  end if else \(TEXT\gets switchOperators(TEXT)\);  end if \(PROX\leftarrow onVerifyProx(TEXT)\); ifSEARCH<-getCurrentCollection() =\"all\"then \(FQS\leftarrow\)\"\(fq=collection:\)\"\(+\)\"\(+\)\(getCurrentCollection()\) +\"\(+\)\(FQS\); else  end if \(FQS\leftarrow onVerifyProcessParts(FQS)\); ifFIELD=\"EMENTA\"then \(CONTENT\leftarrow\)\"\(q=documentVerbation:\)\"\(+\)\(PROX+\) \"\(ORdocumentDisposal:\)\"\(+\)\(PROX+\) \"\(ORdocumentConclusion:\)\"\(+\)\(PROX\); else \(CONTENT\leftarrow\)\"\(q=\)\"\(+\)\(FIELD+\)\(PROX\);  end if \(QRY\gets REST_{A}PI_{S}ERVER+\)\"?\"\(+\)\(CONTENT+ROWS+FQS+SORT\);  saveLastRequest(FIELD, TEXT, QRY); \(JSON\leftarrow\)\(solrRequest(QRY)\); return JSON;  end procedure
```  
**Algorithm 1**Search Algorithm  
Figure 1: Results of a search performed in the Jurisprudence Search system. The Jurisprudence Search System allows the integration with CADE's internal databases, being structured data or not, and the indexed data from CADE's SEI, CADE in Numbers, Portal, Intranet, audio transcripts, among others. In building the intelligence of the system's data, we use machine learning, and to ensure accurate indexing, the jurisprudence system is composed of an architectural model in three stages: (i) The first called indexing stage; (ii) the second is called machine learning, and (iii) the third is classification, in order to increase the Artificial Intelligence layer gradually and concisely. In the indexing stage, we define the essential terms, create the term vectors, and apply the TF-IDF and the relevance of the terms, considering the synonym treatment performed previously, as shown in search Algorithm 1. Then, the machine learning step consists of indexing and classifying the data. We also use dictionary technologies enriched in the previous stages, allowing a model with faceted and word search with more significant support for knowledge formation. The end-user consumes a structure based on facets and pivots during the classification phase, following the selected preferences and its query routines. In the machine learning step, we first performed the model training using the Learning to Rank (LTR) technique [42], and the Support Vector Machine (SVM) algorithm [43]. Next, we perform cross-validation, that is, a process that estimates the training error and validates the dataset selected for training. In general, the jurisprudence system allows the user to enter a set of keywords and retrieve documents related to that set, also considering synonyms relevant to the search. The system interface provides a search on classified data in which the returned results are later related laterally as a more detailed filter, either by subject categorization or related tags, composing a search filter. When consolidating the search, it should be possible to treat the results by relevance, most accessed, or referenced documents.