Search Operators
Refining search results
Clinia uses a set of shared operators, enabling a developer to filter for specific records in a Data Partition or Search Engine.
Equal
An operation to test if the given property has the same value, or some equivalence (ex: Case insensitive for symbol
type). The wildcard *
can be used alone to test if the field has a value, or with text to test for partial match.
{
"eq": {
"<propertyKey>": "<value>" // String, Date, Integer, Geopoint, Time, ...
}
}
Less Than
Only usable on date, time or numerical fields An operation to test if a property has a value lower or equal than a given one.
{
"lt": {
"<propertyKey>": "<value>" // Date, Time, Integer, Decimal
}
}
Greater Than
Only usable on date, time or numerical fields. An operation to test if a property has a value greater or equal than a given one.
{
"gt": {
"<propertyKey>": "<value>" // Date, Time, Integer, Decimal
}
}
Geo Distance
Only usable on geopoint fields. An operation to test if a geopoint attribute lies within the range of a specified flight distance from a particular point.
{
"geoDistance": {
"<propertyKey>": {
"radius": 20000, // Flight distance search in meters
"coordinates": {
"longitude": 45.0,
"latitude": -73.0
}
}
}
}
Any
An operation to test if a property is one of the given values (comparison using the equal operation).
{
"any": {
"<propertyKey>": [
"<value1>",
"<value2>"
]
}
}
All
An operation to test if an enumerable property has all of the given values (comparison using the equal operation).
{
"all": {
"<propertyKey>": [
"<value1>",
"<value2>"
]
}
}
Match
An operation to perform full-text search on a symbol
datatype. The match
operator has three components:
type
: The type of matching to perform. Possible values for this field are:word
: Word search is used to search for words that contain the query. Each word in the query is searched for in the specified property. The query is considered a match if all the words are found, irrespective of the order.wordPrefix
: Word prefix search is used to search for words that start with the query. Each word in the query is searched for in the specified properties. The query is considered a match if all the words are found irrespective of the order and the words start with the query.phrase
: Phrase search is used to search for words in a specific order. The query is split into words, and each word is searched for in the specified property. The query is considered a match if all the words are found in the correct order.phrasePrefix
: Phrase prefix search is used to search for words in a specific order. The query is split into words and each word is searched for in the specified property. The query is considered a match if all the words are found in the correct order and the last word starts with the query.
fuzziness
: Expressed as an integer, the amount of character that can be different between the supplied and matched values. A difference is based on casing, diacritics, and character type.value
: The value to match.
{
"match": {
"<propertyKey>": {
"value": "<value>",
"fuzziness": "<fuzziness>",
"type": "<type>"
}
}
}
Updated 18 days ago