Query Syntax

Query Example Notes
single term document Searches for documents that contain "document" term in the default field.
phrase "important document" Searches for documents that contain the phrase "important document" in the default fiels.
searching fields title:document Searches for documents that contain "document" term in the "title" field.
wildcard search document* Multi-character wildcard search. It will match "document" and "documentation". 
fuzzy search document~ Search based on similar spelling.
  document~0.9 Search based on similar spelling. 0.9 is the required similarity (default: 0.5)
range search author:{Einstein TO Newton} Searches for document with "author" field value between specified values.
  date:{20050101 TO 20050201} Searches for document with "date" field (DateTime type) value between specified dates.
relevance important^4 document Set boost factor of the term "important" to 4. Default boost factor is 1.
OR operator important document "OR" is the default operator.
  important OR document The default field must contain either "important" or "document".
AND operator important AND document The default field must contain both word.
+ operator important +document The default field must contain "document" and may contain "important".
NOT/- operator -important document The default field must contain "document" but not "important".
grouping (important OR office) AND document Use parentheses for expression grouping.
  author:(Einstein OR Newton) Parentheses work with fields as well.

Prohibited Queries

Query Examples Notes
wildcard at the beginning of a term *ocument Throws Lucene.Net.QueryParsers.ParseException.
stop words a, the, and Stop words are not indexed.
special characters: + - && || ! ( ) { } [ ] ^ " ~ * ? : \ \+, \: Use a backslash to escape the special characters.