org.apache.lucene.search.suggest.document

Class CompletionQuery

    • Constructor Detail

      • CompletionQuery

        protected CompletionQuery(Term term,
                                  BitsProducer filter)
        Creates a base Completion query against a term with a filter to scope the documents
    • Method Detail

      • getField

        public String getField()
        Returns the field name this query should be run against
      • getTerm

        public Term getTerm()
        Returns the term to be queried against
      • rewrite

        public Query rewrite(IndexReader reader)
                      throws IOException
        Description copied from class: Query
        Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.
        Overrides:
        rewrite in class Query
        Throws:
        IOException
      • 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