How to use the Knightnet Site Search FacilityThe full-text search capability supports the following operators:
- +
- A leading plus sign indicates that this word must be present in every row returned.
- -
- A leading minus sign indicates that this word must not be present in any row returned.
By default (when neither plus nor minus is specified) the word is optional, but the rows that
contain it will be rated higher.
These two operators are used to change a word's contribution to the relevance value that is
assigned to a row. The operator - decreases the contribution and the + operator increases it.
See the example below.
- ( )
- Parentheses are used to group words into subexpressions.
- ~
- A leading tilde acts as a negation operator, causing the word's contribution to the row
relevance to be negative. It's useful for marking noise words. A row that contains such a word
will be rated lower than others, but will not be excluded altogether, as it would be with the
- operator.
- *
- An asterisk is the truncation operator. Unlike the other operators, it should be appended to
the word, not prepended.
- "
- The phrase, that is enclosed in double quotes ", matches only rows that contain this phrase
literally, as it was typed.
And here are some examples:
- apple banana
- find rows that contain at least one of these words.
- +apple +juice
- ... both words.
- +apple macintosh
- ... word "apple", but rank it higher if it also contain "macintosh".
- +apple -macintosh
- ... word "apple" but not "macintosh".
- +apple +(turnover strudel)
- ... "apple" and "turnover", or "apple" and "strudel" (in any order), but rank "apple pie"
higher than "apple strudel".
- apple*
- ... "apple", "apples", "applesauce", and "applet".
- "some words"
- ... "some words of wisdom", but not "some noise words".
Note: This information is taken directly from the mySQL manual, I will replace it with
something a bit more friendly when I get the chance.
|