Class TermRangeQueryCommand

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

public class TermRangeQueryCommand extends QueryCommand
Command class for handling term range query execution and conversion. This class processes Lucene TermRangeQuery objects and converts them to OpenSearch QueryBuilder instances.
  • Constructor Details

    • TermRangeQueryCommand

      public TermRangeQueryCommand()
      Default constructor for TermRangeQueryCommand.
  • 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.
    • convertTermRangeQuery

      protected org.opensearch.index.query.QueryBuilder convertTermRangeQuery(QueryContext context, org.apache.lucene.search.TermRangeQuery termRangeQuery, float boost)
      Converts a TermRangeQuery to a QueryBuilder with the given boost value. Handles both search fields and default field queries with proper range semantics.
      Parameters:
      context - the query context
      termRangeQuery - the term range query to convert
      boost - the boost value to apply
      Returns:
      the converted QueryBuilder