mirror of https://github.com/apache/lucene.git
SOLR-10907: add @SuppressWarnings("resource") in ExpandComponent
This commit is contained in:
parent
0dad305193
commit
945bf8fa82
|
@ -216,6 +216,7 @@ public class ExpandComponent extends SearchComponent implements PluginInfoInitia
|
|||
if(CollapsingQParserPlugin.HINT_TOP_FC.equals(hint)) {
|
||||
Map<String, UninvertingReader.Type> mapping = new HashMap();
|
||||
mapping.put(field, UninvertingReader.Type.SORTED);
|
||||
@SuppressWarnings("resource")
|
||||
UninvertingReader uninvertingReader = new UninvertingReader(new ReaderWrapper(searcher.getSlowAtomicReader(), field), mapping);
|
||||
values = uninvertingReader.getSortedDocValues(field);
|
||||
} else {
|
||||
|
@ -386,6 +387,7 @@ public class ExpandComponent extends SearchComponent implements PluginInfoInitia
|
|||
if(CollapsingQParserPlugin.HINT_TOP_FC.equals(hint)) {
|
||||
Map<String, UninvertingReader.Type> mapping = new HashMap();
|
||||
mapping.put(field, UninvertingReader.Type.SORTED);
|
||||
@SuppressWarnings("resource")
|
||||
UninvertingReader uninvertingReader = new UninvertingReader(new ReaderWrapper(searcher.getSlowAtomicReader(), field), mapping);
|
||||
values = uninvertingReader.getSortedDocValues(field);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue