Skip to content
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

[Backport 2.x] Add ignore_unmapped support in KNNQueryBuilder #1152

Merged

Conversation

ryanbogan
Copy link
Member

Description

Add ignore_unmapped support in KNNQueryBuilder

Issues Resolved

#1018

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed as per the DCO using --signoff

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.

@ryanbogan ryanbogan changed the title Add ignore_unmapped support in KNNQueryBuilder [2.x] Add ignore_unmapped support in KNNQueryBuilder Sep 22, 2023
Signed-off-by: Ryan Bogan <[email protected]>
@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Merging #1152 (6a00f1c) into 2.x (6c898d7) will decrease coverage by 0.12%.
Report is 2 commits behind head on 2.x.
The diff coverage is 80.00%.

@@             Coverage Diff              @@
##                2.x    #1152      +/-   ##
============================================
- Coverage     85.03%   84.91%   -0.12%     
- Complexity     1160     1168       +8     
============================================
  Files           154      154              
  Lines          4751     4781      +30     
  Branches        434      442       +8     
============================================
+ Hits           4040     4060      +20     
- Misses          515      523       +8     
- Partials        196      198       +2     
Files Coverage Δ
.../main/java/org/opensearch/knn/index/IndexUtil.java 61.97% <100.00%> (+6.23%) ⬆️
...rg/opensearch/knn/index/query/KNNQueryBuilder.java 82.96% <72.00%> (-2.22%) ⬇️

... and 1 file with indirect coverage changes

@ryanbogan ryanbogan changed the title [2.x] Add ignore_unmapped support in KNNQueryBuilder [Backport 2.x] Add ignore_unmapped support in KNNQueryBuilder Sep 29, 2023
@ryanbogan ryanbogan marked this pull request as ready for review September 29, 2023 22:59
private static final Version MINIMAL_SUPPORTED_VERSION_FOR_IGNORE_UNMAPPED = Version.V_2_10_0;
public static final Map<String, Version> minimalRequiredVersionMap = new HashMap<String, Version>() {
{
put("filter", MINIMAL_SUPPORTED_VERSION_FOR_LUCENE_HNSW_FILTER);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we can use shorter initialization for map here:

public static final Map<String, Version> minimalRequiredVersionMap = Map.of (
    "filter", MINIMAL_SUPPORTED_VERSION_FOR_LUCENE_HNSW_FILTER
);

@martin-gaievski martin-gaievski merged commit 39836c6 into opensearch-project:2.x Oct 3, 2023
38 of 67 checks passed
@ryanbogan ryanbogan deleted the ignore_unmapped_2.x branch October 11, 2023 17:10
heemin32 added a commit to heemin32/k-NN that referenced this pull request Oct 11, 2023
heemin32 added a commit to heemin32/k-NN that referenced this pull request Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants