Skip to content

Commit

Permalink
Add user documentation for match_bool_prefix.
Browse files Browse the repository at this point in the history
Signed-off-by: MaxKsyunz <[email protected]>
  • Loading branch information
MaxKsyunz committed May 27, 2022
1 parent 56ead1b commit a149dd7
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/user/dql/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2195,3 +2195,26 @@ Another example to show how to set custom values for the optional parameters::
| Bond |
+------------+


MATCH_BOOL_PREFIX
-----

Description
>>>>>>>>>>>

``match_bool_prefix(field_expression, query_expression)``

The match_bool_prefix function maps to the match_bool_prefix query in the search engine. match_bool_prefix creates a match query from all but the last term in the query string. The last term is used to create a prefix query.

Example with only ``field`` and ``query`` expressions, and all other parameters are set default values::
```
os> SELECT firstname, address FROM accounts WHERE match_bool_prefix(address, 'Bristol Stre');
fetched rows / total rows = 2/2
+-------------+--------------------+
| firstname | address |
|-------------+--------------------|
| Hattie | 671 Bristol Street |
| Nanette | 789 Madison Street |
+-------------+--------------------+

```

0 comments on commit a149dd7

Please sign in to comment.