Is this really the version you are looking for? Kentico Xperience 10 Documentation is no longer updated. Use the switcher in the header to choose your product version.
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, configure the Search options property of the Smart search dialog with results or Smart search results web part. You can choose one of the following levels of supported syntax:
Note: 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 through the Search options property, 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 . If you wish to view syntax errors in place of the results directly on the live site, enable the property of the given smart search results web part.
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
Unless the web part used to display the search results has the Block field-only search property enabled, 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 creating Search filters. (opens in a new tab)
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:
If you need to specify date and time values through macros, call the ToSearchDateTime method to convert the values to the suitable format. For example:
The ToSearchDateTime method's second optional parameter sets a default DateTime value returned if the first parameter is null.
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: