Search Query Types
- Keyword: similar to Google Search, a keyword search returns results ordered by relevance. Searching on "ancient warfare" will prioritize records that contain the full string "ancient warfare", but will also include records that contain the individual words "ancient" or "warfare".
- Boolean: allows greater fine-tuning than keyword search but does not return results by relevance. Do this by using certain characters at the beginning or end of words in the search string. Some examples:
- +: a leading plus sign indicates that this word must be present in each row that is returned.
- -: a leading minus sign indicates that this word must not be present in any of the rows that are returned.
- *: an appended asterisk serves as the truncation (or wildcard) operator. Words match if they begin with the word preceding the * operator.
- ": a phrase that is enclosed within double quote characters matches only rows that contain the phrase literally, as it was typed.
- More special characters and further information about boolean search can be found on the MySQL website.
- Exact match: returns records that contain at least one match to the order of words entered, like "Civil War". Use this search type if you need to search short words, like "war", and the keyword/boolean searches do not produce results.
If you are having trouble finding by a phrase the following may be part of the problem:
- MySQL by default does not index any words shorter than 4 letters long.
- Exact match searches will look for the exact string given by the user, anywhere in the record. For example a search for 'poe' would also return 'poem'.
- MySQL considers terms that appear in over 50% of indexed items to be so common that it excludes them from keyword searches. The easy way to tell if a term meets the the 50% threshold that's at fault is to choose the "boolean" search, as MySQL does not apply the 50% limitation to boolean searches