| Back | Main view
IMiS ARC server custom search query syntax
Product: | IMiS/ARChive |
Release: | |
Date: | 07/16/2025 |
Case:
IMiS ARC server uses custom search query syntax for data search. In this article we describe its syntax and how to use it.
Description:
Description: IMiS ARC server uses two modes for searching:
- Searching in internal database.
- Searching using external search engine (Elasticsearch). Feature is available since 10.3.2210 (10.3.2210.750).
Both modes are using custom search query syntax for searching, which is based on binary expression tree. Binary expression tree supports next operators:
- Equal operator ('=' or '==') and not equal operator ('!=', '<>).
- Token equal ('~') and token not equal operator ('!~'). Operator is available since 10.4.2310-SP2 (10.4.2310.772) and is supported only on string attributes by external search engine.
- Lower and lower or equal ('<', '<=').
- Greater and greater or equal ('>', '>=').
- Logical AND operator ('&', 'and').
- Logical OR operator ('|', 'or').
- Exclusive OR operator ('^', 'xor'). Elasticsearch external search engine supports 'xor' operation only between two attributes.
- Arithmetic operators '+' and '-'.
- Negate operator ('!', 'not').
- Null operator ('null'), which supports searching for null values (not supported by Elasticsearch external search engine).
- Full text search support ('{search expression}'), which is always executed by external search engine.
Search query syntax has next reserved keywords:
- Square brackets '' represent attribute which is used for searching.
- Round brackets '()' represent group of operations which are executed in specific order.
- Reserved keywords for date/time operations:
- '@YEAR@' represents current year.
- '@MONTH@' represents current month.
- '@TODAY@' represents current date without time.
- '@NOW@' represents current date and time.
- Reserved suffix for date/time operations:
- 'Y' - year
- 'M' - month
- 'D' - day
Until 10.4.2310-SP2 (10.4.2310.772), Elasticsearch uses simple query string for exact match operations (equal and not equal operation) for string attributes. After 10.4.2310.772, term query is used which returns exact match results. Token search (token equal and not equal) still use simple query string. Next examples demonstrate search query syntax usage.
Example 1: Search equal and not equal values in title
[sys:Title] = "one two"
[sys:Title] == "one two"
[sys:Title] != "one two"
Example 2: Search tokens in title (equal and not equal)
[sys:Title] ~ "one"
[sys:Title] !~ "one"
Example 3: Using AND operator for searching opened entities (status) with specific title
[sys:Title] = "one two" AND [sys:Status] = 1
[sys:Title] = "one two" & [sys:Status] = 1
[sys:Title] == "one two" AND [sys:Status] == 1
[sys:Title] == "one two" & [sys:Status] == 1
Example 4: Searching entities which were created 1 year (or more) ago
[sys:Created] + 1Y < @NOW@
Example 5: Search entities which are 1 day old and has specific title
[sys:Created] + 1D > @NOW@ AND [sys:Title] = "one two"
Example 6: Search entities with specific title or entities which contains word 'etsi'
[sys:Title] = "one two" OR {etsi}
Example 7: Search entities which have either specific title value or its status is opened
[sys:Title] = "indeks" XOR [sys:Status] = 1
Example 8: Search entities which must contain all three full text search tokens
{one +two +three}
Example 9: Search entities which must contain all three full text search tokens and must not contains fourth token
{one +two +three +-four}
Example 10: Search entities which must contain all three full text search tokens and must not contains fourth token and title must start with phrase "one-two"
{ena +dva +tri +-stiri} AND [sys:Title] = "one-two*"
Related Documents:
https://en.wikipedia.org/wiki/Binary_expression_tree
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html

- IMiS ARChive Elasticsearch plugin configuration
| Back | Main view