Merge pull request #18094 from mikemccand/completion_stats_once

Don't try to compute completion stats on a reader after we already closed it

Conflicts:
	core/src/main/java/org/elasticsearch/index/shard/IndexShard.java
This commit is contained in:
Michael McCandless 2016-05-02 14:40:08 -04:00 committed by Mike McCandless
parent 15f33e61b7
commit 16c4c251f5
1 changed files with 0 additions and 3 deletions

View File

@ -680,9 +680,6 @@ public class IndexShard extends AbstractIndexShardComponent {
CompletionStats completionStats = new CompletionStats(); CompletionStats completionStats = new CompletionStats();
try (final Engine.Searcher currentSearcher = acquireSearcher("completion_stats")) { try (final Engine.Searcher currentSearcher = acquireSearcher("completion_stats")) {
completionStats.add(CompletionFieldStats.completionStats(currentSearcher.reader(), fields)); completionStats.add(CompletionFieldStats.completionStats(currentSearcher.reader(), fields));
Completion090PostingsFormat postingsFormat = ((Completion090PostingsFormat)
PostingsFormat.forName(Completion090PostingsFormat.CODEC_NAME));
completionStats.add(postingsFormat.completionStats(currentSearcher.reader(), fields));
} }
return completionStats; return completionStats;
} }