SmartHub Query Syntax
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
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
To construct complex queries, you can combine multiple free-text expressions with SmartHub Query Language query operators.
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 | Description | Syntax | Unsupported backends |
---|---|---|---|
AND | Returns search results that include all of the free text expressions, or property restrictions specified with the AND operator |
Example: DisplayAuthor:"Tony" AND date>2022-01-01 |
|
NOT | Returns search results that don't include the specified free text expressions or property restrictions. | <Expression1> NOT <Expression2>
|
|
OR | Returns search results that include one or more of the specified free text expressions or property restrictions. |
Example: DisplayAuthor:"Tony" OR DisplayAuthor="George" |
|
NEAR | The NEAR operator matches the results where the specified search terms are within proximity to each other, without preserving the order of the terms. |
Example: "acquisition" NEAR(n=4) "debt"
Note: Combination with wildcard operators is not supported |
|
ONEAR | 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: "acquisition" ONEAR(n=4) "debt"
Note: Combination with wildcard operators is not supported |
|
* | The wildcard operator enables prefix matching |
Example: Tes* |
|
? | The wildcard operator enables prefix matching |
Example: ?est |
|
XRANK | 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. |
Example: title:Advanced XRANK(cb=1) title:Search |
|
SmartHub Query Language Query Property Restrictions
Operator | Data Type | Description | Syntax/Example | Unsupported backends |
---|---|---|---|---|
< |
|
Returns results where the property value is less than the value specified in the property restriction. | date<2022-01-01 |
|
: |
|
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 does not equal the value specified in the property restriction. | size<>10000 |
|
= |
|
Returns search results where the property value is equal to the value specified in the property restriction. | title="George" | |
>= |
|
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 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 |
|
All date/time values must be specified according to the UTC (Coordinated Universal Time), also known as GMT (Greenwich Mean Time) time zone.
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