Class Query

  • All Implemented Interfaces:
    Serializable

    public abstract class Query
    extends Object
    implements Serializable
    Defines the methodology for matching documents based on simple boolean logic over term and document level attributes.
    Author:
    David B. Bracewell
    See Also:
    Serialized Form
    • Constructor Detail

      • Query

        public Query()
    • Method Detail

      • matches

        public abstract boolean matches​(Document document)
        Tests if the document matches the query
        Parameters:
        document - the document
        Returns:
        True if the test passes, False if not
      • toLucene

        public abstract org.apache.lucene.search.Query toLucene()
        Converts the Query into a Lucene Search Query
        Returns:
        the Lucene search Query