Class ElasticsearchUtil

java.lang.Object
fr.gouv.vitam.common.database.server.elasticsearch.ElasticsearchUtil

public class ElasticsearchUtil extends Object
Elasticsearch Util
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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
    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.
    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
    gteQuery(String key, Object value)
     
    static co.elastic.clients.elasticsearch._types.query_dsl.Query
    gtQuery(String key, Object value)
     
    static co.elastic.clients.elasticsearch._types.query_dsl.Query
    lteQuery(String key, Object value)
     
    static co.elastic.clients.elasticsearch._types.query_dsl.Query
    ltQuery(String key, Object 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
    matchAllQuery(String key, String query, int maxExpansions)
     
    static co.elastic.clients.elasticsearch._types.query_dsl.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
     
    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
    regex(String key, String value)
     
    static co.elastic.clients.elasticsearch._types.query_dsl.Query
     
    static co.elastic.clients.elasticsearch._types.query_dsl.Query
    termQuery(String key, boolean value)
     
    static co.elastic.clients.elasticsearch._types.query_dsl.Query
    termQuery(String key, int value)
     
    static co.elastic.clients.elasticsearch._types.query_dsl.Query
    termQuery(String key, long value)
     
    static co.elastic.clients.elasticsearch._types.query_dsl.Query
    termQuery(String key, String value)
     
    static co.elastic.clients.elasticsearch._types.query_dsl.Query
    termsQuery(String key, String... values)
     
    static co.elastic.clients.elasticsearch._types.query_dsl.Query
     
    static co.elastic.clients.elasticsearch._types.Time
    timeOfMilliseconds(int duration)
     
     
     
    static String
     
    static co.elastic.clients.elasticsearch._types.query_dsl.Query
    wildcard(String key, String val)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public static co.elastic.clients.elasticsearch._types.query_dsl.Query termQuery(String key, String value)
    • termsQuery

      public static co.elastic.clients.elasticsearch._types.query_dsl.Query termsQuery(String key, String... values)
    • termsQuery

      public static co.elastic.clients.elasticsearch._types.query_dsl.Query termsQuery(String key, Collection<String> values)
    • lteQuery

      public static co.elastic.clients.elasticsearch._types.query_dsl.Query lteQuery(String key, Object value)
    • ltQuery

      public static co.elastic.clients.elasticsearch._types.query_dsl.Query ltQuery(String key, Object value)
    • gteQuery

      public static co.elastic.clients.elasticsearch._types.query_dsl.Query gteQuery(String key, Object value)
    • gtQuery

      public static co.elastic.clients.elasticsearch._types.query_dsl.Query gtQuery(String key, Object value)
    • 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

      public static co.elastic.clients.elasticsearch._types.query_dsl.Query exists(String key)
    • regex

      public static co.elastic.clients.elasticsearch._types.query_dsl.Query regex(String key, String value)
    • wildcard

      public static co.elastic.clients.elasticsearch._types.query_dsl.Query wildcard(String key, String val)
    • simpleQueryString

      public static co.elastic.clients.elasticsearch._types.query_dsl.Query simpleQueryString(String key, String value)
    • matchQuery

      public static co.elastic.clients.elasticsearch._types.query_dsl.Query matchQuery(String key, String query)
    • matchQuery

      public static co.elastic.clients.elasticsearch._types.query_dsl.Query matchQuery(String key, String query, int maxExpansions)
    • matchAllQuery

      public static co.elastic.clients.elasticsearch._types.query_dsl.Query matchAllQuery(String key, String query)
    • matchAllQuery

      public static co.elastic.clients.elasticsearch._types.query_dsl.Query matchAllQuery(String key, String query, int maxExpansions)
    • matchPhraseQuery

      public static co.elastic.clients.elasticsearch._types.query_dsl.Query matchPhraseQuery(String key, String query)
    • matchPhrasePrefixQuery

      public static co.elastic.clients.elasticsearch._types.query_dsl.Query matchPhrasePrefixQuery(String key, String query)
    • matchPhrasePrefixQuery

      public static co.elastic.clients.elasticsearch._types.query_dsl.Query matchPhrasePrefixQuery(String key, String query, int maxExpansions)
    • 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

      public static String transferJsonToMapping(InputStream is) throws IOException
      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

      public static DatabaseException toDatabaseException(String msg, Exception e)
    • toDatabaseException

      public static DatabaseException toDatabaseException(Exception e)