SmartHub Query Syntax
Overview
SmartHub uses SmartHub Query Language for building search queries.
A SmartHub Query Language query consists of one or more of the following elements:
-
Free text or keywords(words or phrases)
-
Property restrictions
Query Language Query Construction
-
You can combine SmartHub Query Language query elements with one or more of the available operators.
-
Free text SmartHub Query Language queries are case-insensitive but the operators must be in uppercase.
-
You can construct SmartHub Query Language queries by using one or more of the following as free-text expressions:
-
A word includes one or more characters
-
A phrase includes two or more words together, separated by spaces enclosed in double quotation marks
-
SmartHub Query Language Query Operators
If there are multiple free-text expressions without any operators in between them, the query behavior is the same as using the AND operator.
Operator | Syntax | Description | Unsupported Search Engines |
---|---|---|---|
AND |
Example:
|
Returns search results that include all of the free text expressions, or property restrictions specified with the AND operator |
|
NOT | <Expression1> NOT <Expression2>
|
Returns search results that don't include the specified free text expressions or property restrictions. |
|
OR |
Example:
|
Returns search results that include one or more of the specified free text expressions or property restrictions. |
|
NEAR |
Example:
Note: Combination with wildcard operators is not supported
|
The NEAR operator matches the results where the specified search terms are within proximity to each other, without preserving the order of the terms. |
|
ONEAR |
Example:
Note: Combination with wildcard operators is not supported
|
The ONEAR operator matches the results where the specified search terms are within close proximity to each other while preserving the order of the terms. |
|
* |
Example:
|
The wildcard operator enables prefix matching |
|
? |
Example:
|
The wildcard operator enables prefix matching |
|
XRANK |
Example:
|
The XRANK operator boosts the dynamic rank of items based on certain term occurrences within the match expression, without changing which items matches the query. |
|
SmartHub Query Language Query Property Restrictions
Operator | Description | Data Type | Unsupported Search Engines | Example |
---|---|---|---|---|
: | Returns results where the value specified in the property restriction is equal to the property value, or matches individual terms in the property value that is stored in the full-text index. |
|
|
title:"Andrei" |
= | Returns search results where the property value is equal to the value specified in the property restriction. |
|
|
title="George" |
< | Returns results where the property value is less than the value specified in the property restriction. |
|
|
date<2022-01-01 |
> | Returns search results where the property value is greater than the value specified in the property restriction. |
|
|
date>2022-01-01 |
<= | Returns search results where the property value is less than or equal to the value specified in the property restriction. |
|
|
date<=2022-01-01 |
>= | Returns search results where the property value is greater than or equal to the value specified in the property restriction. |
|
|
date<=2022-01-01 |
<> | Returns search results where the property value does not equal the value specified in the property restriction. |
|
|
size<>10000 |
Note: All date/time values must be specified according to the UTC (Coordinated Universal Time), also known as GMT (Greenwich Mean Time) time zone.
Date values do not support quotes
Example of invalid property restriction for date:
date<"1900-01-01"
The following ISO 8601-compatible datetime formats are supported in queries:
-
YYYY-MM-DD
SmartHub Advanced Search Query
The Advanced Search component allows users to combine search terms by setting specific parameters for results. Typically, search results are smaller and more relevant than results from a basic search. For more information, see Configure the Advanced Search Module.
Property restrictions
From the Advanced Search page, you can place restrictions on your search query. Refer to the following table for more information:
Field | Value format | Description | Syntax |
---|---|---|---|
All of these words | <term1> <term2> etc. | This returns results that match all of the specified terms, separated by a space. | ALL(<term1> <term2> etc.) |
The exact phrase | <expression> | This returns results that match the exact specified expression. | “<expression>” |
Any of these words | <term1> <term2> etc. | This returns results that match at least one of the specified terms, separated by a space. | ANY(<term1> <term2> etc.) |
None of these words | <term1> <term2> etc. | This returns results that don’t match any of the specified terms, separated by a space. | NONE(<term1> <term2> etc.) |
Additional properties
For additional information on how you can have more control over your additional properties, see Configure the Advanced Search Module.
Fields | Description | Default values with applied query | |
---|---|---|---|
Only the language(s) | This is a list of checkboxes with predefined language mappings. | English | (DetectedLanguage="en") |
French | (DetectedLanguage="fr") | ||
German | (DetectedLanguage="de") | ||
Japanese | (DetectedLanguage="ja") | ||
Simplified Chinese | (DetectedLanguage="zh-cn") | ||
Spanish | (DetectedLanguage="es") | ||
Traditional Chinese | (DetectedLanguage="zh-tw") | ||
Content source | This is a dropdown list of available content sources | - | |
Result type | This is a dropdown list of predefined file type mappings | “Word Documents” | (filetype="doc" OR filetype="docx" OR filetype="dot" OR filetype="docm" OR filetype="odt") |
“Excel Documents” | (filetype="xls" OR filetype="xlsx" OR filetype="xlsm" OR filetype="xlsb" OR filetype="ods") | ||
“PowerPoint Presentations” | (filetype="ppt" OR filetype="pptx" OR filetype="pptm" OR filetype="odp") |
Property restrictions operators
For additional information on how you can have more control over your property restrictions, see Configure the Advanced Search Module.
Property type | Default values with applied query | |
---|---|---|
string | “Contains” | (title:"<value>") |
“Does not contain” | (-title:"<value>") | |
“Starts with” | (title:"<value>*") | |
“Equals” | (title="<value>") | |
“Does not equal” | (-title="<value>") | |
number | “Equals” | (Size=<value>) |
“Does not equal” | (-Size=<value>) | |
“Greater than” | (Size><value>) | |
“Less than” | (Size<<value>) | |
date | “Equals” | (date= 2022-01-01) |
“Does not equal” | (-date= 2022-01-01) | |
“On or before” | (date<= 2022-01-01) | |
“On or after” | (date>= 2022-01-01) |