Class ElasticsearchUtil
java.lang.Object
fr.gouv.vitam.common.database.server.elasticsearch.ElasticsearchUtil
Elasticsearch Util
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic co.elastic.clients.elasticsearch._types.query_dsl.Query
boolMust
(co.elastic.clients.elasticsearch._types.query_dsl.Query... queries) Acts like an "AND" operator: All clauses must matchstatic co.elastic.clients.elasticsearch._types.query_dsl.Query
boolShould
(co.elastic.clients.elasticsearch._types.query_dsl.Query... queries) Acts as an "OR" operator: At least one clause must match.static co.elastic.clients.elasticsearch._types.query_dsl.Query
boolShould
(Collection<co.elastic.clients.elasticsearch._types.query_dsl.Query> queries) Acts as an "OR" operator: At least one clause must match.static String
buildFailureMessage
(co.elastic.clients.elasticsearch.core.BulkResponse response) static co.elastic.clients.elasticsearch._types.query_dsl.Query
static co.elastic.clients.elasticsearch._types.SortOptions
getDocSorts
(co.elastic.clients.elasticsearch._types.SortOrder order) static co.elastic.clients.elasticsearch._types.SortOptions
getFieldSorts
(String key, co.elastic.clients.elasticsearch._types.SortOrder order) static co.elastic.clients.elasticsearch._types.SortOptions
getScoreSort
(co.elastic.clients.elasticsearch._types.SortOrder order) static co.elastic.clients.elasticsearch._types.query_dsl.Query
static co.elastic.clients.elasticsearch._types.query_dsl.Query
static co.elastic.clients.elasticsearch._types.query_dsl.Query
static co.elastic.clients.elasticsearch._types.query_dsl.Query
static co.elastic.clients.elasticsearch._types.query_dsl.Query
matchAll()
static co.elastic.clients.elasticsearch._types.query_dsl.Query
matchAllQuery
(String key, String query) static co.elastic.clients.elasticsearch._types.query_dsl.Query
matchAllQuery
(String key, String query, int maxExpansions) static co.elastic.clients.elasticsearch._types.query_dsl.Query
matchPhrasePrefixQuery
(String key, String query) static co.elastic.clients.elasticsearch._types.query_dsl.Query
matchPhrasePrefixQuery
(String key, String query, int maxExpansions) static co.elastic.clients.elasticsearch._types.query_dsl.Query
matchPhraseQuery
(String key, String query) static co.elastic.clients.elasticsearch._types.query_dsl.Query
matchQuery
(String key, String query) static co.elastic.clients.elasticsearch._types.query_dsl.Query
matchQuery
(String key, String query, int maxExpansions) static co.elastic.clients.elasticsearch._types.query_dsl.Query
mustNot
(co.elastic.clients.elasticsearch._types.query_dsl.Query query) static co.elastic.clients.elasticsearch._types.query_dsl.Query
nestedQuery
(String path, co.elastic.clients.elasticsearch._types.query_dsl.Query command) static co.elastic.clients.elasticsearch._types.query_dsl.Query
rangeInclusiveQuery
(String key, int minInclusive, int maxInclusive) static co.elastic.clients.elasticsearch._types.query_dsl.Query
static co.elastic.clients.elasticsearch._types.query_dsl.Query
simpleQueryString
(String key, String value) static co.elastic.clients.elasticsearch._types.query_dsl.Query
static co.elastic.clients.elasticsearch._types.query_dsl.Query
static co.elastic.clients.elasticsearch._types.query_dsl.Query
static co.elastic.clients.elasticsearch._types.query_dsl.Query
static co.elastic.clients.elasticsearch._types.query_dsl.Query
termsQuery
(String key, String... values) static co.elastic.clients.elasticsearch._types.query_dsl.Query
termsQuery
(String key, Collection<String> values) static co.elastic.clients.elasticsearch._types.Time
timeOfMilliseconds
(int duration) static DatabaseException
static DatabaseException
toDatabaseException
(String msg, Exception e) static String
static co.elastic.clients.elasticsearch._types.query_dsl.Query
-
Constructor Details
-
ElasticsearchUtil
public ElasticsearchUtil()
-
-
Method Details
-
matchAll
public static co.elastic.clients.elasticsearch._types.query_dsl.Query matchAll() -
termQuery
public static co.elastic.clients.elasticsearch._types.query_dsl.Query termQuery(String key, int value) -
termQuery
public static co.elastic.clients.elasticsearch._types.query_dsl.Query termQuery(String key, long value) -
termQuery
public static co.elastic.clients.elasticsearch._types.query_dsl.Query termQuery(String key, boolean value) -
termQuery
-
termsQuery
-
termsQuery
public static co.elastic.clients.elasticsearch._types.query_dsl.Query termsQuery(String key, Collection<String> values) -
lteQuery
-
ltQuery
-
gteQuery
-
gtQuery
-
rangeInclusiveQuery
public static co.elastic.clients.elasticsearch._types.query_dsl.Query rangeInclusiveQuery(String key, int minInclusive, int maxInclusive) -
boolMust
public static co.elastic.clients.elasticsearch._types.query_dsl.Query boolMust(co.elastic.clients.elasticsearch._types.query_dsl.Query... queries) Acts like an "AND" operator: All clauses must match -
boolShould
public static co.elastic.clients.elasticsearch._types.query_dsl.Query boolShould(co.elastic.clients.elasticsearch._types.query_dsl.Query... queries) Acts as an "OR" operator: At least one clause must match. -
boolShould
public static co.elastic.clients.elasticsearch._types.query_dsl.Query boolShould(Collection<co.elastic.clients.elasticsearch._types.query_dsl.Query> queries) Acts as an "OR" operator: At least one clause must match. -
mustNot
public static co.elastic.clients.elasticsearch._types.query_dsl.Query mustNot(co.elastic.clients.elasticsearch._types.query_dsl.Query query) -
exists
-
regex
-
wildcard
-
simpleQueryString
-
matchQuery
-
matchQuery
-
matchAllQuery
-
matchAllQuery
-
matchPhraseQuery
-
matchPhrasePrefixQuery
-
matchPhrasePrefixQuery
-
nestedQuery
public static co.elastic.clients.elasticsearch._types.query_dsl.Query nestedQuery(String path, co.elastic.clients.elasticsearch._types.query_dsl.Query command) -
getScoreSort
public static co.elastic.clients.elasticsearch._types.SortOptions getScoreSort(co.elastic.clients.elasticsearch._types.SortOrder order) -
getFieldSorts
public static co.elastic.clients.elasticsearch._types.SortOptions getFieldSorts(String key, co.elastic.clients.elasticsearch._types.SortOrder order) -
getDocSorts
public static co.elastic.clients.elasticsearch._types.SortOptions getDocSorts(co.elastic.clients.elasticsearch._types.SortOrder order) -
transferJsonToMapping
- Parameters:
is
- InputStream of the file json- Returns:
- String mapping
- Throws:
IOException
-
timeOfMilliseconds
public static co.elastic.clients.elasticsearch._types.Time timeOfMilliseconds(int duration) -
buildFailureMessage
public static String buildFailureMessage(co.elastic.clients.elasticsearch.core.BulkResponse response) -
toDatabaseException
-
toDatabaseException
-