Repository navigation
QUERY_STRING #191 - #85
Conversation
Signed-off-by: forestmvey <[email protected]>
Signed-off-by: forestmvey <[email protected]>
Signed-off-by: forestmvey <[email protected]>
Signed-off-by: forestmvey <[email protected]>
Signed-off-by: forestmvey <[email protected]>
Signed-off-by: forestmvey <[email protected]>
Signed-off-by: forestmvey <[email protected]>
…ngIT. Signed-off-by: forestmvey <[email protected]>
Signed-off-by: forestmvey <[email protected]>
Signed-off-by: forestmvey <[email protected]>
Signed-off-by: forestmvey <[email protected]>
Codecov Report
@@ Coverage Diff @@
## integ-query_string-#191 #85 +/- ##
=============================================================
+ Coverage 97.72% 97.74% +0.02%
- Complexity 2816 2848 +32
=============================================================
Files 271 272 +1
Lines 6934 7001 +67
Branches 439 442 +3
=============================================================
+ Hits 6776 6843 +67
Misses 157 157
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
| ``query_string([field_expression+], query_expression[, option=<option_value>]*)`` | ||
|
|
||
| The query_string function maps to the query_string query used in search engine, to return the documents that match a provided text, number, date or boolean value with a given field or fields. | ||
| The **^** lets you *boost* certain fields. Boosts are multipliers that weigh matches in one field more heavily than matches in other fields. The syntax allows to specify the fields in double quotes, single quotes, in backtick or even without any wrap. All fields search using star ``"*"`` is also available (star symbol should be wrapped). The weight is optional and should be specified using after the field name, it could be delimeted by the `caret` character or by whitespace. Please, refer to examples below: |
There was a problem hiding this comment.
should be specified using after the field name
using is unnecessary, I think.
There was a problem hiding this comment.
Resolved under 4a752021300ed2bded068fe120d3ffc63fcb5b44
| + "tie_breaker=0.3, time_zone='Canada/Pacific', default_operator='or'," | ||
| + "fuzzy_transpositions = false, lenient = true, fuzzy_max_expansions = 25," | ||
| + "minimum_should_match = '2<-25% 9<-3', fuzzy_prefix_length = 7);"; | ||
| var result = new JSONObject(executeQuery(query, "jdbc")); |
There was a problem hiding this comment.
There's a method executeJdbcRequest that simplifies this.
There was a problem hiding this comment.
Resolved under 4a752021300ed2bded068fe120d3ffc63fcb5b44
|
|
||
| String query3 = "SELECT Id FROM " + TEST_INDEX_BEER | ||
| + " WHERE query_string(['*Date'], '2015-01-29');"; | ||
| var result3 = new JSONObject(executeQuery(query3, "jdbc")); |
There was a problem hiding this comment.
Use executeJdbcRequest to simplify this.
There was a problem hiding this comment.
Resolved under 4a752021300ed2bded068fe120d3ffc63fcb5b44
| var result1 = new JSONObject(executeQuery(query1, "jdbc")); | ||
| String query2 = "SELECT Id FROM " | ||
| + TEST_INDEX_BEER + " WHERE query_string(['T*'], 'taste')"; | ||
| var result2 = new JSONObject(executeQuery(query2, "jdbc")); |
There was a problem hiding this comment.
Resolved under 4a752021300ed2bded068fe120d3ffc63fcb5b44
…documentation, minor formatting Signed-off-by: forestmvey <[email protected]>
…elds in SQL and PPL. Signed-off-by: forestmvey <[email protected]>
index name should end with map. Signed-off-by: Vijayan Balasubramanian <[email protected]>
Description
Support
query_stringrelevance function in SQL and PPL.Issues Resolved
Github Issue: 191
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.