mirror of https://github.com/apache/lucene.git
Revert "SOLR-10907: Fix Resource Leak warning in ExpandComponent."
This reverts commit 55b0227d8c
.
This commit is contained in:
parent
c20d3aff94
commit
05433eb709
|
@ -199,8 +199,6 @@ Bug Fixes
|
||||||
thus disabling the global check, and replaces it with specific checks where desired via
|
thus disabling the global check, and replaces it with specific checks where desired via
|
||||||
QueryUtils.build(). (yonik)
|
QueryUtils.build(). (yonik)
|
||||||
|
|
||||||
* SOLR-10907: Fix Resource Leak warning in ExpandComponent. (Christine Poerschke)
|
|
||||||
|
|
||||||
Optimizations
|
Optimizations
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
|
|
@ -216,13 +216,8 @@ public class ExpandComponent extends SearchComponent implements PluginInfoInitia
|
||||||
if(CollapsingQParserPlugin.HINT_TOP_FC.equals(hint)) {
|
if(CollapsingQParserPlugin.HINT_TOP_FC.equals(hint)) {
|
||||||
Map<String, UninvertingReader.Type> mapping = new HashMap();
|
Map<String, UninvertingReader.Type> mapping = new HashMap();
|
||||||
mapping.put(field, UninvertingReader.Type.SORTED);
|
mapping.put(field, UninvertingReader.Type.SORTED);
|
||||||
try (UninvertingReader uninvertingReader = new UninvertingReader(
|
UninvertingReader uninvertingReader = new UninvertingReader(new ReaderWrapper(searcher.getSlowAtomicReader(), field), mapping);
|
||||||
new ReaderWrapper(
|
values = uninvertingReader.getSortedDocValues(field);
|
||||||
searcher.getSlowAtomicReader(),
|
|
||||||
field),
|
|
||||||
mapping)) {
|
|
||||||
values = uninvertingReader.getSortedDocValues(field);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
values = DocValues.getSorted(reader, field);
|
values = DocValues.getSorted(reader, field);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue