Class PhraseQueryCommand

java.lang.Object
org.codelibs.fess.query.QueryCommand
org.codelibs.fess.query.PhraseQueryCommand

public class PhraseQueryCommand extends QueryCommand
Query command for phrase queries.
  • Constructor Details

    • PhraseQueryCommand

      public PhraseQueryCommand()
      Default constructor.
  • Method Details

    • getQueryClassName

      protected String getQueryClassName()
      Description copied from class: QueryCommand
      Gets the class name of the query this command handles.
      Specified by:
      getQueryClassName in class QueryCommand
      Returns:
      The query class name.
    • execute

      public org.opensearch.index.query.QueryBuilder execute(QueryContext context, org.apache.lucene.search.Query query, float boost)
      Description copied from class: QueryCommand
      Executes the query command and returns a QueryBuilder.
      Specified by:
      execute in class QueryCommand
      Parameters:
      context - The query context containing search parameters.
      query - The Lucene query to execute.
      boost - The boost factor to apply.
      Returns:
      The executed QueryBuilder.
    • convertPhraseQuery

      protected org.opensearch.index.query.QueryBuilder convertPhraseQuery(QueryContext context, org.apache.lucene.search.PhraseQuery phraseQuery, float boost)
      Converts a phrase query to a query builder.
      Parameters:
      context - the query context
      phraseQuery - the phrase query
      boost - the boost factor
      Returns:
      the query builder
    • convertPhraseQuery

      protected org.opensearch.index.query.QueryBuilder convertPhraseQuery(org.codelibs.fess.mylasta.direction.FessConfig fessConfig, QueryContext context, org.apache.lucene.search.PhraseQuery phraseQuery, float boost, String field, String[] texts)
      Converts a phrase query to a query builder with specified field and texts.
      Parameters:
      fessConfig - the Fess configuration
      context - the query context
      phraseQuery - the phrase query
      boost - the boost factor
      field - the field name
      texts - the query texts
      Returns:
      the query builder