This page provides syntax for constructing free-text queries.
(See the documentation of the Lucene Project
)
| Search type | Description | Example |
|---|---|---|
| Terms | A Single Term is a single word such as "penguin" or "bruce". A Phrase is a group of words surrounded by double quotes such as "emperor penguin". |
|
| single character wildcard | To perform a single character wildcard search use the "?" symbol. | pen?uin |
| mutiple character wildcard | Multiple character wildcard searches looks for 0 or more characters. | peng* |
| fuzzy searches | To do a fuzzy search use the tilde, "~", symbol at the end of a Single word Term | peng~ |
| proximity search | To do a proximity search use the tilde, "~", symbol at the end of a Phrase | Within 10 words of each other in a document, try "penguin petrel"~10 |
| Boosting a Term | To boost a term use the caret, "^", symbol with a boost factor (a number) at the end of the term you are searching. The higher the boost factor, the more relevant the term will be. | penguin^4 petrel |
| Boolean operators OR | The OR operator is the default conjunction operator. This means that if there is no Boolean operator between two terms, the OR operator is used. The OR operator links two terms and finds a matching document if either of the terms exist in a document | penguin OR petrel |
| Boolean operators AND | The AND operator matches documents where both terms exist anywhere in the text of a single document. This is equivalent to an intersection using sets. The symbol && can be used in place of the word AND. | penguin AND petrel |
| operator + | The "+" or required operator requires that the term after the "+" symbol exist somewhere in a the field of a single document. | +penguin petrel |
| operator NOT | The NOT operator excludes documents that contain the term after NOT. | penguin NOT petrel |
| operator - | The "-" or prohibit operator excludes documents that contain the term after the "-" symbol. | penguin -petrel |
| Grouping | using parentheses to group clauses to form sub queries. This can be very useful if you want to control the boolean logic for a query. | (penguin OR albatross) AND heard |
| Escaping Special Characters | The current list special characters are+ - && || ! ( ) { } [ ] ^ " ~ * ? : \
To escape these character use the \ before the character. |
\? |


