SOLR-5624: Guard against NPE during cache warming

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1566309 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Joel Bernstein 2014-02-09 16:34:36 +00:00
parent 0a3e6856e4
commit a055f02e8a
1 changed files with 6 additions and 2 deletions

View File

@ -305,8 +305,12 @@ public class CollapsingQParserPlugin extends QParserPlugin {
int maxDoc = searcher.maxDoc();
int leafCount = searcher.getTopReaderContext().leaves().size();
SolrRequestInfo info = SolrRequestInfo.getRequestInfo();
this.boosted = (Set<String>)info.getReq().getContext().get(QueryElevationComponent.BOOSTED);
if(this.boosted == null) {
SolrRequestInfo info = SolrRequestInfo.getRequestInfo();
if(info != null) {
this.boosted = (Set<String>)info.getReq().getContext().get(QueryElevationComponent.BOOSTED);
}
}
IntOpenHashSet boostDocs = getBoostDocs(searcher, this.boosted);