Class LuceneQueryClause

java.lang.Object
com.apple.foundationdb.record.lucene.LuceneQueryClause
All Implemented Interfaces:
PlanHashable
Direct Known Subclasses:
LuceneAutoCompleteQueryClause, LuceneBooleanQuery, LuceneQueryFieldComparisonClause, LuceneQueryMultiFieldSearchClause, LuceneQuerySearchClause

@API(UNSTABLE) public abstract class LuceneQueryClause extends Object implements PlanHashable
Binder for a single query clause.
  • Constructor Details

    • LuceneQueryClause

      protected LuceneQueryClause(@Nonnull LuceneQueryType queryType)
  • Method Details

    • getQueryType

      @Nonnull public LuceneQueryType getQueryType()
    • bind

      public abstract LuceneQueryClause.BoundQuery bind(@Nonnull FDBRecordStoreBase<?> store, @Nonnull Index index, @Nonnull EvaluationContext context)
    • getPlannerGraphDetails

      public abstract void getPlannerGraphDetails(@Nonnull com.google.common.collect.ImmutableList.Builder<String> detailsBuilder, @Nonnull com.google.common.collect.ImmutableMap.Builder<String,com.apple.foundationdb.record.query.plan.cascades.explain.Attribute> attributeMapBuilder)
    • toBoundQuery

      @Nonnull protected LuceneQueryClause.BoundQuery toBoundQuery(@Nonnull org.apache.lucene.search.Query luceneQuery)
    • getHighlightingTermsMap

      @Nonnull protected static Map<String,Set<String>> getHighlightingTermsMap(@Nonnull org.apache.lucene.search.Query query)
      Parse the Lucene query to get all the mapping from field to terms.
      Parameters:
      query - lucene query to extract all terms from
      Returns:
      a new highlighting terms map
    • combineHighlightingTermsMaps

      @CanIgnoreReturnValue @Nonnull protected static Map<String,Set<String>> combineHighlightingTermsMaps(@Nonnull Map<String,Set<String>> existingMap, @Nonnull Map<String,Set<String>> newMap)