From a149dd7e57c2074cb0f313bb04b711d355ebb4e7 Mon Sep 17 00:00:00 2001 From: MaxKsyunz Date: Fri, 27 May 2022 02:22:51 -0700 Subject: [PATCH] Add user documentation for match_bool_prefix. Signed-off-by: MaxKsyunz --- docs/user/dql/functions.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/user/dql/functions.rst b/docs/user/dql/functions.rst index 188c326f6d..695abef760 100644 --- a/docs/user/dql/functions.rst +++ b/docs/user/dql/functions.rst @@ -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 | + +-------------+--------------------+ + +```