_all: Add missing boost

When we rewrite to a MatchNoTermsQuery we were throwing out the boost which
could could lead to funky changes when the query against _all was in a
bool query.
This commit is contained in:
Nik Everett 2015-07-28 09:25:06 -04:00
parent d7491515b2
commit adcd1fc11d
1 changed files with 3 additions and 1 deletions

View File

@ -138,7 +138,9 @@ public final class AllTermQuery extends PayloadTermQuery {
}
}
if (fieldExists == false) {
return new MatchNoDocsQuery();
Query rewritten = new MatchNoDocsQuery();
rewritten.setBoost(getBoost());
return rewritten;
}
if (hasPayloads == false) {
TermQuery rewritten = new TermQuery(term);