Class RealTimeRegexpMatcher
- java.lang.Object
-
- org.apache.pinot.segment.local.utils.nativefst.utils.RealTimeRegexpMatcher
-
public class RealTimeRegexpMatcher extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classRealTimeRegexpMatcher.PathRepresents a path in the FST traversal directed by the automaton
-
Constructor Summary
Constructors Constructor Description RealTimeRegexpMatcher(String regexQuery, MutableFST fst, org.roaringbitmap.IntConsumer dest)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanmatch(String input)static voidregexMatch(String regexQuery, MutableFST fst, org.roaringbitmap.IntConsumer dest)voidregexMatchOnFST()This function runs matching on automaton built from regexQuery and the FST.
-
-
-
Constructor Detail
-
RealTimeRegexpMatcher
public RealTimeRegexpMatcher(String regexQuery, MutableFST fst, org.roaringbitmap.IntConsumer dest)
-
-
Method Detail
-
regexMatch
public static void regexMatch(String regexQuery, MutableFST fst, org.roaringbitmap.IntConsumer dest)
-
match
public boolean match(String input)
-
regexMatchOnFST
public void regexMatchOnFST()
This function runs matching on automaton built from regexQuery and the FST. FST stores key (string) to a value (Long). Both are state machines and state transition is based on a input character. This algorithm starts with Queue containing (Automaton Start Node, FST Start Node). Each step an entry is popped from the queue: 1) if the automaton state is accept and the FST Node is final (i.e. end node) then the value stored for that FST is added to the set of result. 2) Else next set of transitions on automaton are gathered and for each transition target node for that character is figured out in FST Node, resulting pair of (automaton state, fst node) are added to the queue. 3) This process is bound to complete since we are making progression on the FST (which is a DAG) towards final nodes.
-
-