Package org.codelibs.fess.query
Class PhraseQueryCommand
java.lang.Object
org.codelibs.fess.query.QueryCommand
org.codelibs.fess.query.PhraseQueryCommand
Query command for phrase queries.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.codelibs.fess.query.QueryCommand
QueryCommand.DefaultQueryBuilderFunction, QueryCommand.FieldQueryBuilder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.opensearch.index.query.QueryBuilderconvertPhraseQuery(QueryContext context, org.apache.lucene.search.PhraseQuery phraseQuery, float boost) Converts a phrase query to a query builder.protected org.opensearch.index.query.QueryBuilderconvertPhraseQuery(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.org.opensearch.index.query.QueryBuilderexecute(QueryContext context, org.apache.lucene.search.Query query, float boost) Executes the query command and returns a QueryBuilder.protected StringGets the class name of the query this command handles.Methods inherited from class org.codelibs.fess.query.QueryCommand
buildDefaultQueryBuilder, buildMatchPhraseQuery, convertWithFieldCheck, createDefaultQueryBuilder, createFieldSortBuilder, getQueryFieldConfig, getQueryLanguages, getQueryProcessor, getSearchField, isSearchField, register
-
Constructor Details
-
PhraseQueryCommand
public PhraseQueryCommand()Default constructor.
-
-
Method Details
-
getQueryClassName
Description copied from class:QueryCommandGets the class name of the query this command handles.- Specified by:
getQueryClassNamein classQueryCommand- 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:QueryCommandExecutes the query command and returns a QueryBuilder.- Specified by:
executein classQueryCommand- 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 contextphraseQuery- the phrase queryboost- 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 configurationcontext- the query contextphraseQuery- the phrase queryboost- the boost factorfield- the field nametexts- the query texts- Returns:
- the query builder
-