Class LuceneQueryComponent
java.lang.Object
com.apple.foundationdb.record.lucene.LuceneQueryComponent
- All Implemented Interfaces:
PlanHashable
,ComponentWithNoChildren
,QueryComponent
,QueryHashable
@API(EXPERIMENTAL)
public class LuceneQueryComponent
extends Object
implements QueryComponent, ComponentWithNoChildren
A Query Component for Lucene that wraps the query supplied.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.apple.foundationdb.record.PlanHashable
PlanHashable.PlanHashKind, PlanHashable.PlanHashMode
Nested classes/interfaces inherited from interface com.apple.foundationdb.record.QueryHashable
QueryHashable.QueryHashKind
-
Field Summary
Fields inherited from interface com.apple.foundationdb.record.PlanHashable
CURRENT_FOR_CONTINUATION, CURRENT_LEGACY
-
Constructor Summary
ConstructorsConstructorDescriptionLuceneQueryComponent
(LuceneQueryType type, String query, boolean queryIsParameter, List<String> fields, boolean multiFieldSearch) LuceneQueryComponent
(LuceneQueryType type, String query, boolean queryIsParameter, List<String> fields, boolean multiFieldSearch, LuceneScanQueryParameters.LuceneQueryHighlightParameters luceneQueryHighlightParameters, Set<String> explicitFieldNames) LuceneQueryComponent
(String query, List<String> fields) LuceneQueryComponent
(String query, List<String> fields, boolean multiField) -
Method Summary
Modifier and TypeMethodDescriptionboolean
evalMessage
(FDBRecordStoreBase<M> store, EvaluationContext context, FDBRecord<M> rec, Message message) expand
(Quantifier.ForEach baseQuantifier, Supplier<Quantifier.ForEach> outerQuantifierSupplier, List<String> fieldNamePrefix) getQuery()
getType()
int
hashCode()
boolean
boolean
int
int
queryHash
(QueryHashable.QueryHashKind hashKind) toString()
void
validate
(Descriptors.Descriptor descriptor) withNewFields
(List<String> fields, Set<String> explicitFieldNames) Creates an instance of thisLuceneQueryComponent
with a new list of fields.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.apple.foundationdb.record.PlanHashable
planHash, planHash
Methods inherited from interface com.apple.foundationdb.record.query.expressions.QueryComponent
eval, evalAsync, evalMessageAsync, expand, isAsync, withParameterRelationshipMap
-
Constructor Details
-
LuceneQueryComponent
-
LuceneQueryComponent
-
LuceneQueryComponent
public LuceneQueryComponent(LuceneQueryType type, String query, boolean queryIsParameter, List<String> fields, boolean multiFieldSearch) -
LuceneQueryComponent
public LuceneQueryComponent(LuceneQueryType type, String query, boolean queryIsParameter, List<String> fields, boolean multiFieldSearch, @Nullable LuceneScanQueryParameters.LuceneQueryHighlightParameters luceneQueryHighlightParameters, @Nullable Set<String> explicitFieldNames)
-
-
Method Details
-
evalMessage
@Nonnull public <M extends Message> Boolean evalMessage(@Nonnull FDBRecordStoreBase<M> store, @Nonnull EvaluationContext context, @Nullable FDBRecord<M> rec, @Nullable Message message) - Specified by:
evalMessage
in interfaceQueryComponent
-
validate
- Specified by:
validate
in interfaceQueryComponent
-
expand
@Nonnull public GraphExpansion expand(@Nonnull Quantifier.ForEach baseQuantifier, @Nonnull Supplier<Quantifier.ForEach> outerQuantifierSupplier, @Nonnull List<String> fieldNamePrefix) - Specified by:
expand
in interfaceQueryComponent
-
getType
-
getQuery
-
isQueryIsParameter
public boolean isQueryIsParameter() -
getFields
-
isMultiFieldSearch
public boolean isMultiFieldSearch() -
getLuceneQueryHighlightParameters
@Nullable public LuceneScanQueryParameters.LuceneQueryHighlightParameters getLuceneQueryHighlightParameters() -
getExplicitFieldNames
-
withNewFields
@Nonnull public LuceneQueryComponent withNewFields(@Nonnull List<String> fields, @Nullable Set<String> explicitFieldNames) Creates an instance of thisLuceneQueryComponent
with a new list of fields.- Parameters:
fields
- The new list of fields.explicitFieldNames
- the new list of explicit field names- Returns:
- a new instance of
LuceneQueryComponent
.
-
equals
-
hashCode
public int hashCode() -
planHash
- Specified by:
planHash
in interfacePlanHashable
-
toString
-
queryHash
- Specified by:
queryHash
in interfaceQueryHashable
-