-
Notifications
You must be signed in to change notification settings - Fork 2
Search Syntax Using Edismax And
Kevin Day edited this page Feb 15, 2023
·
12 revisions
This follows a simple phrase based search process with full keyword OR
and AND
support.
- 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
AND
,OR
, andNOT
special use words. - Each space separated word or phrase is automatically combined using an
AND
condition except when the following word or phrase does not have a leading+
or-
or whenOR
is 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. - Explicitly add
NOT
(all upper-case) to exclude a word or phrase just like the-
character. - Trailing punctuation is generally ignored when matching and can be omitted (for example,
Center,
andCenter
should be treated as the same search).
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 the following results:
- My Apple
- My Red Apple
- My red hat is covering up an apple.
Using a search of "my apple"
should produce the following results:
- My Apple
Using a search of +my apple
should produce the following results:
- My Apple
- My Red Apple
- My red hat is covering up an apple.
Using a search of +my +apple
should produce the following results:
- My Apple
- My Red Apple
- My red hat is covering up an apple.
Using a search of +my -red +apple
should produce the following results:
- My Apple
Using a search of +my +red -apple
should produce the following results:
- no results
Using a search of +my -red -apple
should produce the following results:
- My Orange
Using a search of -apple
should produce the following results:
- My Orange
- Yellow Banana
Using a search of "red apple"
should produce the following results:
- My Red Apple
- Red Apple