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

[AUTO] Increment version to 2.12.0-SNAPSHOT #414

Merged
merged 2 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ validateNebulaPom.enabled = false

buildscript {
ext {
opensearch_version = System.getProperty("opensearch.version", "2.11.0-SNAPSHOT")
opensearch_version = System.getProperty("opensearch.version", "2.12.0-SNAPSHOT")
buildVersionQualifier = System.getProperty("build.version_qualifier", "")
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
version_tokens = opensearch_version.tokenize('-')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import org.apache.lucene.search.Explanation;
import org.apache.lucene.search.ImpactsDISI;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.MaxScoreCache;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryVisitor;
import org.apache.lucene.search.ScoreMode;
Expand Down Expand Up @@ -170,7 +171,8 @@
}
};
final ImpactsEnum impacts = termsEnum.impacts(PostingsEnum.FREQS);
final ImpactsDISI impactsDisi = new ImpactsDISI(impacts, impacts, scorer);
MaxScoreCache maxScoreCache = new MaxScoreCache(impacts, scorer);
final ImpactsDISI impactsDisi = new ImpactsDISI(impacts, maxScoreCache);

Check warning on line 175 in src/main/java/org/apache/lucene/BoundedLinearFeatureQuery.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/apache/lucene/BoundedLinearFeatureQuery.java#L174-L175

Added lines #L174 - L175 were not covered by tests

return new Scorer(this) {

Expand All @@ -191,12 +193,12 @@

@Override
public int advanceShallow(int target) throws IOException {
return impactsDisi.advanceShallow(target);
return impactsDisi.getMaxScoreCache().advanceShallow(target);

Check warning on line 196 in src/main/java/org/apache/lucene/BoundedLinearFeatureQuery.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/apache/lucene/BoundedLinearFeatureQuery.java#L196

Added line #L196 was not covered by tests
}

@Override
public float getMaxScore(int upTo) throws IOException {
return impactsDisi.getMaxScore(upTo);
return impactsDisi.getMaxScoreCache().getMaxScore(upTo);

Check warning on line 201 in src/main/java/org/apache/lucene/BoundedLinearFeatureQuery.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/apache/lucene/BoundedLinearFeatureQuery.java#L201

Added line #L201 was not covered by tests
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import java.util.Map;
import java.util.Optional;

import org.opensearch.indices.IndicesService;
import org.opensearch.ingest.IngestService;
import org.opensearch.ingest.Processor;
import org.opensearch.neuralsearch.processor.NeuralQueryEnricherProcessor;
Expand Down Expand Up @@ -66,7 +67,8 @@ public void testProcessors() {
null,
mock(IngestService.class),
null,
null
null,
mock(IndicesService.class)
);
Map<String, Processor.Factory> processors = plugin.getProcessors(processorParams);
assertNotNull(processors);
Expand Down
Loading