Class PrefixQueryCommand

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

public class PrefixQueryCommand extends QueryCommand
Query command for prefix queries.
  • Field Details

    • lowercaseWildcard

      protected boolean lowercaseWildcard
      Flag to convert wildcard to lowercase.
  • Constructor Details

    • PrefixQueryCommand

      public PrefixQueryCommand()
      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.
    • convertPrefixQuery

      protected org.opensearch.index.query.QueryBuilder convertPrefixQuery(QueryContext context, org.apache.lucene.search.PrefixQuery prefixQuery, float boost)
      Converts a prefix query to a query builder.
      Parameters:
      context - the query context
      prefixQuery - the prefix query
      boost - the boost factor
      Returns:
      the query builder
    • toLowercaseWildcard

      protected String toLowercaseWildcard(String value)
      Converts value to lowercase if lowercase wildcard is enabled.
      Parameters:
      value - the value to convert
      Returns:
      the converted value
    • setLowercaseWildcard

      public void setLowercaseWildcard(boolean lowercaseWildcard)
      Sets the lowercase wildcard flag.
      Parameters:
      lowercaseWildcard - the lowercase wildcard flag