Percolator: Filtering percolators based on a query can cause wrong matches to be returned, closes #1925.
This commit is contained in:
parent
927b4385a8
commit
42eda48c15
|
@ -401,6 +401,8 @@ public class PercolatorExecutor extends AbstractIndexComponent {
|
|||
|
||||
private final Lucene.ExistsCollector collector = new Lucene.ExistsCollector();
|
||||
|
||||
private FieldData fieldData;
|
||||
|
||||
QueryCollector(ESLogger logger, ImmutableMap<String, Query> queries, IndexSearcher searcher, IndexService percolatorIndex, List<String> matches) {
|
||||
this.logger = logger;
|
||||
this.queries = queries;
|
||||
|
@ -409,8 +411,6 @@ public class PercolatorExecutor extends AbstractIndexComponent {
|
|||
this.matches = matches;
|
||||
}
|
||||
|
||||
private FieldData fieldData;
|
||||
|
||||
@Override
|
||||
public void setScorer(Scorer scorer) throws IOException {
|
||||
}
|
||||
|
@ -429,6 +429,7 @@ public class PercolatorExecutor extends AbstractIndexComponent {
|
|||
}
|
||||
// run the query
|
||||
try {
|
||||
collector.reset();
|
||||
searcher.search(query, collector);
|
||||
if (collector.exists()) {
|
||||
matches.add(id);
|
||||
|
|
Loading…
Reference in New Issue