| Single word | foo | |
| Phrase | ”foo bar” | |
| AND, OR, NOT | foo AND bar, foo OR bar, foo NOT bar | The “NOT” operator excludes documents that contain the term after NOT. It cannot be used with just one term, for example, NOT foo will not work. |
| Wildcard search | foo*, foo*bar, foo?, foo?bar | ”?” is used for single character wildcard search; ”*” is used for multiple character wildcard search. ”*” and ”?” cannot be used as the first character of a search. |
| Fuzzy search | foo~, foo~0.8 | Use ”~” at the end of a single word term to search for a similar term based on string similarity. You can specify the similarity value between 0 and 1 with a higher value indicating higher similarity. |
| Proximity search | ”foo bar”~10 | Use ”~” at the end of a phrase like “foo bar”~10 to search for a “foo” and “bar” within 10 words of each other in a document. Note that the proximity search in Lucene is ordered, i.e., the terms will be matched in exact order. |
| Regular expression | /\d+/ | Wrap regex inside / and / |