Repository navigation
Add implementation of multi_match similar to simple_query_string. - #71
Conversation
Signed-off-by: Yury Fridlyand <[email protected]>
Codecov Report
@@ Coverage Diff @@
## integ-multi_match-#188 #71 +/- ##
============================================================
+ Coverage 97.69% 97.71% +0.01%
- Complexity 2777 2801 +24
============================================================
Files 269 270 +1
Lines 6859 6912 +53
Branches 437 439 +2
============================================================
+ Hits 6701 6754 +53
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.
|
| ; | ||
|
|
||
| multiFieldRelevanceFunctionName | ||
| : SIMPLE_QUERY_STRING |
There was a problem hiding this comment.
Typo. Would be fixed by merge.
Signed-off-by: Yury Fridlyand <[email protected]>
| */ | ||
|
|
||
| @Test | ||
| public void test1() throws IOException { |
There was a problem hiding this comment.
test1 is not a good name for the test
| + " WHERE multi_match(['Tags'], 'taste')"; | ||
| var result1 = new JSONObject(executeQuery(query1, "jdbc")); | ||
| String query2 = "SELECT count(*) FROM " + TEST_INDEX_BEER | ||
| + " WHERE multi_match(['T*'], 'taste')"; |
There was a problem hiding this comment.
are there other variations of the wildcard we should consider? '*te' - for example?
| + "minimum_should_match = '2<-25% 9<-3', prefix_length = 7, tie_breaker = 0.3," | ||
| + "type = most_fields, slop = 2, zero_terms_query = 'ALL');"; | ||
| var result = new JSONObject(executeQuery(query, "jdbc")); | ||
| assertNotEquals(0, result.getInt("total")); |
There was a problem hiding this comment.
I'd prefer to see an explicit answer (like assetEquals(2, ...).
| msg); | ||
| } | ||
|
|
||
| // TODO multi_match tests: |
| void multi_match() { | ||
| FunctionExpression expr = dsl.multi_match(fields, query); | ||
| assertEquals(String.format("multi_match(fields=%s, query=%s)", | ||
| fields.getValue().toString(), query.getValue().toString()), |
There was a problem hiding this comment.
There's no need to call toString in argument to String.format.
It will be called automatically -- https://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html
…y_string` both. Signed-off-by: Yury Fridlyand <[email protected]>
Signed-off-by: Yury Fridlyand [email protected]
Description
See also #66.
Issues Resolved
opensearch-project#188
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.