-
Notifications
You must be signed in to change notification settings - Fork 3
Search Syntax Using Dismax Or
Kevin Day edited this page Feb 15, 2023
·
9 revisions
This follows a simple phrase based search process that does not support wild cards.
- Use
+or-to denote mandatory or prohibited matches of a given phrase. - Use quotes to group phrases for more precise matching, such as
"word1 word2". - Searches are case-insensitive such that upper and lower case letters are treated as indistinguishable, except for
ANDandORspecial use words. - Each space separated word or phrase is automatically combined using an
ANDcondition except when the following word or phrase does not have a leading+or-or except whenANDis explicitly specified between words. - Explicitly add either the word
AND(all upper-case) or the wordOR(all upper-case) between each space separated word to override the default combining condition. - Trailing punctuation is generally ignored when matching and can be omitted (for example,
Center,andCentershould be treated as the same search). - This does not support boosting, for example
word^1.0has no meaning and attempts to matchword^1.0rather thanword. - The following characters may have special meaning and may need to be escaped for literal matching using the escape character
\:+ - \.
Consider the following titles:
- My Apple
- My Red Apple
- Red Apple
- Blue Apple
- My Orange
- Yellow Banana
- My red hat is covering up an apple.
Using a search of my apple should produce:
- My Apple
- My Red Apple
- Red Apple
- Blue Apple
- My Orange
- My red hat is covering up an apple.
Using a search of my^2.0 apple^1.0 should produce:
- no results
Using a search of "my apple" should produce:
- My Apple
- My Red Apple
- Red Apple
- Blue Apple
- My Orange
- My red hat is covering up an apple.
Using a search of +my apple should produce:
- My Apple
- My Red Apple
- Red Apple
- Blue Apple
- My Orange
- My red hat is covering up an apple.
Using a search of +my +apple should produce:
- My Apple
- My Red Apple
- Red Apple
- Blue Apple
- My Orange
- My red hat is covering up an apple.
Using a search of +my -red +apple should produce:
- My Apple
- Blue Apple
- My Orange
Using a search of +my +red -apple should produce:
- no results
Using a search of +my -red -apple should produce:
- My Orange
Using a search of -apple should produce:
- My Orange
- Yellow Banana
Using a search of "red apple" should produce:
- My Red Apple
- Red Apple