HCL OneDB query operators

The HCL OneDB™ query operators are extensions to the MongoDB API.

Query operators

You can use the HCL OneDB query operators in all MongoDB functions that accept query operators, for example find() or findOne().
The $onedbText query operator is similar to the MongoDB $text operator, except that it passes the search string as-is to the bts_contains() function.
When using relational tables, the MongoDB $text and HCL OneDB $onedbText query operators both require a column name, specified by $key, in addition to the $search string.
The search string can be a word or a phrase as well as optional query term modifiers, operators, and stopwords. You can include field names to search in specific fields. The syntax of the search string in the $ifxtext query operator is the same as the syntax of the search criteria in the bts_contains() function that you include in an SQL query.
In the following example, a single-character wildcard search is run for the strings text or test:
db.collection.find( { "$ifxtext" : { "$search" : "te?t" } } )
The $like query operator tests for matching character strings and maps to the SQL LIKE query operator. For more information about the SQL LIKE query operator, see LIKE Operator.
In the following example, a wildcard search is run for strings that contain machine:
db.collection.find( { "$like" : "%machine%" )