org.elasticsearch.common.lucene.search.Queries

public class Queries extends
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.lucene.search.Query
    applyMinimumShouldMatch​(org.apache.lucene.search.BooleanQuery query,  minimumShouldMatch)
     
    static int
    calculateMinShouldMatch​(int optionalClauseCount,  spec)
     
    static org.apache.lucene.search.BooleanQuery
    filtered​(org.apache.lucene.search.Query query, org.apache.lucene.search.Query filter)
     
    static org.apache.lucene.search.Query
    fixNegativeQueryIfNeeded​(org.apache.lucene.search.Query q)
     
    static org.apache.lucene.search.Query
    maybeApplyMinimumShouldMatch​(org.apache.lucene.search.Query query,  minimumShouldMatch)
    Potentially apply minimum should match value if we have a query that it can be applied to, otherwise return the original query.
    static org.apache.lucene.search.Query
     field,  e)
     
    static org.apache.lucene.search.Query
     
    static org.apache.lucene.search.Query
     reason)
    Return a query that matches no document.
    static org.apache.lucene.search.Query
     
    static org.apache.lucene.search.Query
    newNonNestedFilter​(Version indexVersionCreated)
    Creates a new non-nested docs query
    static org.apache.lucene.search.Query
     field)
     
    static org.apache.lucene.search.Query
    <> fields)
     
    static org.apache.lucene.search.Query
    not​(org.apache.lucene.search.Query q)
    Return a query that matches all documents but those that match the given query.

    Methods inherited from class java.lang.

    , , , , , , , , , ,
  • Constructor Details

    • Queries

      public Queries()
  • Method Details

    • newMatchAllQuery

      public static org.apache.lucene.search.Query newMatchAllQuery()
    • newMatchNoDocsQuery

      public static org.apache.lucene.search.Query newMatchNoDocsQuery( reason)
      Return a query that matches no document.
    • newUnmappedFieldQuery

      public static org.apache.lucene.search.Query newUnmappedFieldQuery( field)
    • newUnmappedFieldsQuery

      public static org.apache.lucene.search.Query newUnmappedFieldsQuery(<> fields)
    • newLenientFieldQuery

      public static org.apache.lucene.search.Query newLenientFieldQuery( field,  e)
    • newNestedFilter

      public static org.apache.lucene.search.Query newNestedFilter()
    • newNonNestedFilter

      public static org.apache.lucene.search.Query newNonNestedFilter(Version indexVersionCreated)
      Creates a new non-nested docs query
      Parameters:
      indexVersionCreated - the index version created since newer indices can identify a parent field more efficiently
    • filtered

      public static org.apache.lucene.search.BooleanQuery filtered(@Nullable org.apache.lucene.search.Query query, @Nullable org.apache.lucene.search.Query filter)
    • not

      public static org.apache.lucene.search.Query not(org.apache.lucene.search.Query q)
      Return a query that matches all documents but those that match the given query.
    • fixNegativeQueryIfNeeded

      public static org.apache.lucene.search.Query fixNegativeQueryIfNeeded(org.apache.lucene.search.Query q)
    • applyMinimumShouldMatch

      public static org.apache.lucene.search.Query applyMinimumShouldMatch(org.apache.lucene.search.BooleanQuery query, @Nullable  minimumShouldMatch)
    • maybeApplyMinimumShouldMatch

      public static org.apache.lucene.search.Query maybeApplyMinimumShouldMatch(org.apache.lucene.search.Query query, @Nullable  minimumShouldMatch)
      Potentially apply minimum should match value if we have a query that it can be applied to, otherwise return the original query.
    • calculateMinShouldMatch

      public static int calculateMinShouldMatch(int optionalClauseCount,  spec)