Class MultiTermHighlighting.AutomataCollector

    • Field Detail

      • lookInSpan

        final boolean lookInSpan
      • fieldMatcher

        final java.util.function.Predicate<java.lang.String> fieldMatcher
    • Constructor Detail

      • AutomataCollector

        private AutomataCollector​(boolean lookInSpan,
                                  java.util.function.Predicate<java.lang.String> fieldMatcher)
    • Method Detail

      • acceptField

        public boolean acceptField​(java.lang.String field)
        Description copied from class: QueryVisitor
        Whether or not terms from this field are of interest to the visitor Implement this to avoid collecting terms from heavy queries such as TermInSetQuery that are not running on fields of interest
        Overrides:
        acceptField in class QueryVisitor
      • consumeTermsMatching

        public void consumeTermsMatching​(Query query,
                                         java.lang.String field,
                                         ByteRunAutomaton automaton)
        Description copied from class: QueryVisitor
        Called by leaf queries that match on a class of terms
        Overrides:
        consumeTermsMatching in class QueryVisitor
        Parameters:
        query - the leaf query
        field - the field queried against
        automaton - an automaton defining which terms match