File tree Expand file tree Collapse file tree
server/src/main/java/org/elasticsearch/index/engine Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4747import org .apache .lucene .search .SearcherFactory ;
4848import org .apache .lucene .search .SearcherManager ;
4949import org .apache .lucene .search .TermQuery ;
50+ import org .apache .lucene .search .Weight ;
5051import org .apache .lucene .store .AlreadyClosedException ;
5152import org .apache .lucene .store .Directory ;
5253import org .apache .lucene .store .LockObtainFailedException ;
@@ -263,8 +264,9 @@ private static LocalCheckpointTracker createLocalCheckpointTracker(EngineConfig
263264 final IndexSearcher searcher = new IndexSearcher (reader );
264265 searcher .setQueryCache (null );
265266 final Query query = LongPoint .newRangeQuery (SeqNoFieldMapper .NAME , localCheckpoint + 1 , maxSeqNo );
267+ final Weight weight = searcher .createWeight (query , ScoreMode .COMPLETE_NO_SCORES , 1.0f );
266268 for (LeafReaderContext leaf : reader .leaves ()) {
267- final Scorer scorer = searcher . createWeight ( query , ScoreMode . COMPLETE_NO_SCORES , 1.0f ) .scorer (leaf );
269+ final Scorer scorer = weight .scorer (leaf );
268270 if (scorer == null ) {
269271 continue ;
270272 }
You can’t perform that action at this time.
0 commit comments