Skip to content

Commit

Permalink
[AUTO] Increment version to 2.12.0-SNAPSHOT (opensearch-project#414)
Browse files Browse the repository at this point in the history
* Increment version to 2.12.0-SNAPSHOT

Signed-off-by: Martin Gaievski <gaievski@amazon.com>
  • Loading branch information
opensearch-trigger-bot[bot] authored Nov 21, 2023
1 parent 2fe7ed2 commit a430c6d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
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 @@ public float score(float freq, long norm) {
}
};
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);

return new Scorer(this) {

Expand All @@ -191,12 +193,12 @@ public DocIdSetIterator iterator() {

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

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

@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

0 comments on commit a430c6d

Please sign in to comment.