Important: The information on this page applies to searches made using locally stored indexes. If you are using Azure Search indexes, refer to the Simple query syntax (opens in a new tab) and Lucene query syntax (opens in a new tab) articles to learn about the supported syntax options.
Users can submit advanced search expressions using the Lucene query parser syntax. You can find detailed information at:
http://lucene.apache.org/core/old_versioned_docs/versions/3_0_3/queryparsersyntax.html (opens in a new tab)
To allow the advanced syntax, choose one of the following levels of supported syntax for your search requests:
Developers can adjust the level in the search code via the SearchParameters object (the Basic syntax level is used by default).
The system only processes advanced query syntax correctly for search requests that use the Any word Search mode. Other search modes may interfere with the syntax. For example, using the OR boolean operator contradicts the All words search mode.
Search syntax errors
If you allow advanced search expressions, a parsing error occurs if a user enters the query syntax incorrectly.
By default, syntax errors cause the search to show the standard "No results" message, and the system enters the error into the application's Event log.
Field searching allows users to define additional conditions in search expressions. All conditions must start with either the + or - symbol. The + symbol indicates that only results which fulfill the field condition should be returned. The - symbol has the opposite meaning, only results that do not contain the specified value in the given field are retrieved.
For example:
When searching for this expression using a page index, the smart search returns only news pages containing the word network, released in the year 2008 or 2009.
Field search requirements
Field search only works for fields that have the Searchable option enabled in the Local search field configuration of the searched object type. If there is no field name specified before a value in the search expression (such as the word network in the example above), the system searches the index fields marked as Content.
It is also possible to perform direct field searches without any standard content keywords. This allows users to find records simply by entering an exact field value:
Tip: Using field search queries provides a great deal of flexibility, but is not convenient for regular website visitors. If you wish to allow users to limit the scope of searches through conditions on the live site, we recommended building filters as part of your search interface.
When searching in text fields, you do not need to specify the type of the value. However, keep in mind the following when searching for values containing spaces:
When performing field searches, the values specified are processed as strings by default. If you are searching in Integer, Floating-point (double) or Decimal type fields, you need to explicitly specify the data type of values in the search syntax:
Use the following syntax to search in DateTime fields: <field name>:yyyymmddhhmm.
For example:
Indexes created by Stop and Simple analyzers cannot be searched using the standard field search format. This is by design, but you can use a workaround with a range query containing identical boundaries: