Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search performance - better caching logic for queries on wildcard field #76035

Merged
merged 7 commits into from
Aug 5, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.apache.lucene.search.ConstantScoreWeight;
import org.apache.lucene.search.DocIdSetIterator;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.MatchAllDocsQuery;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.Scorer;
Expand Down Expand Up @@ -83,8 +84,8 @@ public Scorer scorer(LeafReaderContext context) throws IOException {
public boolean matches() throws IOException {
if (values.advanceExact(approxDisi.docID()) == false)
markharwood marked this conversation as resolved.
Show resolved Hide resolved
{
// Bug if we have an indexed value but no doc value.
assert false;
// Bug if we have an indexed value (i.e an approxQuery) but no doc value.
assert approxQuery instanceof MatchAllDocsQuery == false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain why this assertion changed? The original version seemed correct to me.

return false;
}
BytesRef arrayOfValues = values.binaryValue();
Expand Down