org.apache.lucene.search

Class GraphQuery



  • public final class GraphQuery
    extends Query
    A query that wraps multiple sub-queries generated from a graph token stream.
    • Constructor Detail

      • GraphQuery

        public GraphQuery(Query... queries)
        Constructor sets the queries and checks if any of them are a boolean query.
        Parameters:
        queries - the non-null array of queries
    • Method Detail

      • getQueries

        public List<QuerygetQueries()
        Gets the queries
        Returns:
        unmodifiable list of Query
      • hasBoolean

        public boolean hasBoolean()
        If there is at least one boolean query or not.
        Returns:
        true if there is a boolean, false if not
      • hasPhrase

        public boolean hasPhrase()
        If there is at least one phrase query or not.
        Returns:
        true if there is a phrase query, false if not
      • toString

        public String toString(String field)
        Description copied from class: Query
        Prints a query to a string, with field assumed to be the default field and omitted.
        Specified by:
        toString in class Query
      • equals

        public boolean equals(Object other)
        Description copied from class: Query
        Override and implement query instance equivalence properly in a subclass. This is required so that QueryCache works properly. Typically a query will be equal to another only if it's an instance of the same class and its document-filtering properties are identical that other instance. Utility methods are provided for certain repetitive code.
        Specified by:
        equals in class Query
        See Also:
        Query.sameClassAs(Object), Query.classHash()