Class RequestToElasticsearch
java.lang.Object
fr.gouv.vitam.common.database.translators.RequestToAbstract
fr.gouv.vitam.common.database.translators.elasticsearch.RequestToElasticsearch
- Direct Known Subclasses:
SelectToElasticsearch
Request To Elasticsearch
-
Field Summary
Fields inherited from class fr.gouv.vitam.common.database.translators.RequestToAbstract
requestParser
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionco.elastic.clients.elasticsearch._types.query_dsl.Query
getInitialRoots
(String field) Additional filter to first requestco.elastic.clients.elasticsearch._types.query_dsl.Query
getNthQueries
(int nth, VarNameAdapter adapter, DynamicParserTokens parserTokens) find(query)co.elastic.clients.elasticsearch._types.query_dsl.Query
getRequest
(co.elastic.clients.elasticsearch._types.query_dsl.Query roots, co.elastic.clients.elasticsearch._types.query_dsl.Query query) static RequestToElasticsearch
getRequestToElasticsearch
(AbstractParser<?> requestParser) Create the RequestToElasticsearch adapted to the RequestParserMethods inherited from class fr.gouv.vitam.common.database.translators.RequestToAbstract
getFinalLimit, getFinalOffset, getHints, getLastDepth, getNbQueries, getNthQuery, getRequest, getRequestParser, getUsage, hasFullTextQuery, hintCache, hintNoTimeout, isMultiple, model
-
Constructor Details
-
RequestToElasticsearch
- Parameters:
requestParser
- AbstractParser of unknown type
-
-
Method Details
-
getRequestToElasticsearch
public static RequestToElasticsearch getRequestToElasticsearch(AbstractParser<?> requestParser) throws VitamException Create the RequestToElasticsearch adapted to the RequestParser- Parameters:
requestParser
- AbstractParser of unknown type- Returns:
- the associated RequestToElasticsearch
- Throws:
VitamException
- the type of request is not select
-
getInitialRoots
Additional filter to first request- Parameters:
field
- Field from which the proposed values shall be found- Returns:
- the filter associated with the initial roots
-
getRequest
public co.elastic.clients.elasticsearch._types.query_dsl.Query getRequest(co.elastic.clients.elasticsearch._types.query_dsl.Query roots, co.elastic.clients.elasticsearch._types.query_dsl.Query query) - Parameters:
roots
- QueryBuilderquery
- QueryBuilder- Returns:
- the final request
-
getNthQueries
public co.elastic.clients.elasticsearch._types.query_dsl.Query getNthQueries(int nth, VarNameAdapter adapter, DynamicParserTokens parserTokens) throws IllegalAccessError, InvalidParseOperationException find(query)- Parameters:
nth
- intparserTokens
- DynamicParserTokens- Returns:
- the associated query for find (missing the source however, as initialRoots)
- Throws:
IllegalAccessError
- if nth exceed the size of listInvalidParseOperationException
- if could not get command by query
-