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