-
Notifications
You must be signed in to change notification settings - Fork 0
Add Match_query And Matchquery As Alternate Syntax for Match Function #163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
07f18dc
559c380
1fb5e21
726ddbd
990e2f3
cbccd33
77fcacd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2730,6 +2730,95 @@ Another example to show how to set custom values for the optional parameters:: | |
| +------------+ | ||
|
|
||
|
|
||
| MATCHQUERY | ||
| ----- | ||
|
|
||
| Description | ||
| >>>>>>>>>>> | ||
|
|
||
| ``matchquery(field_expression, query_expression[, option=<option_value>]*)`` | ||
|
|
||
| The matchquery function maps to the match query used in search engine, to return the documents that match a provided text, number, date or boolean value with a given field. This is alternate syntax for the `match`_ function. Available parameters include: | ||
|
|
||
| - analyzer | ||
| - auto_generate_synonyms_phrase | ||
| - fuzziness | ||
| - max_expansions | ||
| - prefix_length | ||
| - fuzzy_transpositions | ||
| - fuzzy_rewrite | ||
| - lenient | ||
| - operator | ||
| - minimum_should_match | ||
| - zero_terms_query | ||
| - boost | ||
|
|
||
| Example with only ``field`` and ``query`` expressions, and all other parameters are set default values:: | ||
|
|
||
| os> SELECT lastname, address FROM accounts WHERE match(address, 'Street'); | ||
acarbonetto marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| fetched rows / total rows = 2/2 | ||
| +------------+--------------------+ | ||
| | lastname | address | | ||
| |------------+--------------------| | ||
| | Bond | 671 Bristol Street | | ||
| | Bates | 789 Madison Street | | ||
| +------------+--------------------+ | ||
|
|
||
| Another example to show how to set custom values for the optional parameters:: | ||
|
|
||
| os> SELECT lastname FROM accounts WHERE match(firstname, 'Hattie', operator='AND', boost=2.0); | ||
acarbonetto marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| fetched rows / total rows = 1/1 | ||
| +------------+ | ||
| | lastname | | ||
| |------------| | ||
| | Bond | | ||
| +------------+ | ||
|
|
||
| MATCH_QUERY | ||
| ----- | ||
|
|
||
| Description | ||
| >>>>>>>>>>> | ||
|
|
||
| ``match(field_expression, query_expression[, option=<option_value>]*)`` | ||
acarbonetto marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| The match function maps to the match query used in search engine, to return the documents that match a provided text, number, date or boolean value with a given field. This is alternate syntax for the `match`_ function. Available parameters include: | ||
|
||
|
|
||
| - analyzer | ||
| - auto_generate_synonyms_phrase | ||
| - fuzziness | ||
| - max_expansions | ||
| - prefix_length | ||
| - fuzzy_transpositions | ||
| - fuzzy_rewrite | ||
| - lenient | ||
| - operator | ||
| - minimum_should_match | ||
| - zero_terms_query | ||
| - boost | ||
|
|
||
| Example with only ``field`` and ``query`` expressions, and all other parameters are set default values:: | ||
|
|
||
| os> SELECT lastname, address FROM accounts WHERE match(address, 'Street'); | ||
acarbonetto marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| fetched rows / total rows = 2/2 | ||
| +------------+--------------------+ | ||
| | lastname | address | | ||
| |------------+--------------------| | ||
| | Bond | 671 Bristol Street | | ||
| | Bates | 789 Madison Street | | ||
| +------------+--------------------+ | ||
|
|
||
| Another example to show how to set custom values for the optional parameters:: | ||
|
|
||
| os> SELECT lastname FROM accounts WHERE match(firstname, 'Hattie', operator='AND', boost=2.0); | ||
acarbonetto marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| fetched rows / total rows = 1/1 | ||
| +------------+ | ||
| | lastname | | ||
| |------------| | ||
| | Bond | | ||
| +------------+ | ||
|
|
||
|
|
||
| MATCH_PHRASE | ||
| ------------ | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.