Bifalgorithm post · Sahih el Boykhari · Select Collections
Boolean Logic
Boolean Logic (Sahih el Boykhari · Select Collections) — "Boolean operators allow terms to be combined through logic operators. Lucene supports AND, \"+\", OR,…
Ideas in this flowchart
- Lucene Boolean operators control how terms are combined in queries
- Boolean operators combine terms through logic operators
- Lucene supports AND, "+", OR, NOT, and "-" as Boolean operators
- Boolean operators must be written in ALL CAPS
- OR is the default conjunction when no operator appears between two terms
- OR matches a document if either term exists; || can replace OR
- AND matches documents where both terms exist in the same document; && can replace AND
- "+" requires the following term to exist somewhere in a field
- NOT excludes documents containing the following term; ! can replace NOT
- NOT cannot be used with only one term
- "-" excludes documents containing the following term
- Parentheses group clauses into subqueries to control Boolean logic