optimize filtered query with match_all filter

simply just use the query in that case, and don't add the filter overhead
This commit is contained in:
Shay Banon 2012-12-26 15:47:53 -08:00
parent 8a17222ff2
commit 7a0404ac35
1 changed files with 4 additions and 0 deletions

View File

@ -124,6 +124,10 @@ public class FilteredQueryParser implements QueryParser {
return Queries.NO_MATCH_QUERY;
}
}
if (filter == Queries.MATCH_ALL_FILTER) {
// this is an instance of match all filter, just execute the query
return query;
}
// cache if required
if (cache) {