Class BooleanQueryCommand

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

public class BooleanQueryCommand extends QueryCommand
Query command implementation for handling Boolean queries. Converts Lucene BooleanQuery objects to OpenSearch BoolQueryBuilder objects.
  • Constructor Details

    • BooleanQueryCommand

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

      protected org.opensearch.index.query.QueryBuilder convertBooleanQuery(QueryContext context, org.apache.lucene.search.BooleanQuery booleanQuery, float boost)
      Converts a Lucene BooleanQuery to an OpenSearch BoolQueryBuilder.
      Parameters:
      context - The query context.
      booleanQuery - The boolean query to convert.
      boost - The boost factor to apply.
      Returns:
      The converted BoolQueryBuilder.