attribute-search-engine
Generic search engine for rows with attributes using different matchers.
- Rows
- Attributes
- ExactMatch (HashMap)
- PrefixMatch (PrefixTree/Trie)
- RangeMatch (BTreeMap)
- Attributes
- Queries
- Are in CNF (Conjunctive Normal Form) Example: +name:Hans,Peter +age:25-35 -lastname=Doe Means: (name=Hans || name==Peter) && (age >= 25 && age <= 35) && !(lastname=Doe)
-
- get a set for each predicate
- get the union of these sets for each disjunction
- get the intersections of the resulting sets for each conjunction if the result is empty at some point you can short-circuit and stop
- get the difference of the conjunction result with all negated conjunctions if the result is empty at some point you can short-circuit and stop
- optionally perform a fulltext search