Class SuggesterPhraseQuery

java.lang.Object
org.apache.lucene.search.Query
org.opengrok.suggest.query.SuggesterPhraseQuery

public class SuggesterPhraseQuery extends org.apache.lucene.search.Query
Query for possible suggestions of PhraseQuery. It is divided into CustomPhraseQuery which represents the bare PhraseQuery and SuggesterQuery which represent the query for suggestions.
  • Constructor Details

    • SuggesterPhraseQuery

      public SuggesterPhraseQuery(String field, String identifier, List<String> tokens, int slop)
      Parameters:
      field - term field
      identifier - unique String which identifies the token for which the suggestions should be made
      tokens - all the tokens of the phrase query
      slop - word Levenshtein's distance
  • Method Details

    • getSuggesterQuery

      public SuggesterQuery getSuggesterQuery()
    • getPhraseQuery

      public CustomPhraseQuery getPhraseQuery()
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in class org.apache.lucene.search.Query
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class org.apache.lucene.search.Query
    • toString

      public String toString(String field)
      Specified by:
      toString in class org.apache.lucene.search.Query
    • rewrite

      public org.apache.lucene.search.Query rewrite(org.apache.lucene.search.IndexSearcher indexSearcher)
      Overrides:
      rewrite in class org.apache.lucene.search.Query
    • visit

      public void visit(org.apache.lucene.search.QueryVisitor visitor)
      Specified by:
      visit in class org.apache.lucene.search.Query