Skip to content

Commit b7eacc3

Browse files
committed
add comment / todo
1 parent d442acf commit b7eacc3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/FilteredQueryParser.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,16 @@ public class FilteredQueryParser extends AbstractIndexComponent implements XCont
8686
filter = parseContext.cacheFilter(filter);
8787
}
8888

89-
// we don't cache the filter, we assume it is already cached in the filter parsers...
89+
// TODO
90+
// With the way filtered queries work today, both query and filter advance (one at a time)
91+
// to get hits. Since all filters support random access, it might make sense to use that.
92+
// But, it make more sense to apply it down at the postings level then letting the query
93+
// construct doc ids and extract it.
94+
// This might be possible in lucene 4.0.
95+
// More info:
96+
// - https://issues.apache.org/jira/browse/LUCENE-1536
97+
// - http://chbits.blogspot.com/2010/09/fast-search-filters-using-flex.html
98+
9099
FilteredQuery filteredQuery = new FilteredQuery(query, filter);
91100
filteredQuery.setBoost(boost);
92101
return filteredQuery;

0 commit comments

Comments
 (0)