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

CI fix - remove unsafe assertion in wildcard field #78966

Merged
merged 2 commits into from
Oct 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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,7 +15,6 @@
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.QueryVisitor;
import org.apache.lucene.search.ScoreMode;
Expand Down Expand Up @@ -85,8 +84,7 @@ public Scorer scorer(LeafReaderContext context) throws IOException {
public boolean matches() throws IOException {
if (values.advanceExact(approxDisi.docID()) == false)
{
// Bug if we have an indexed value (i.e an approxQuery) but no doc value.
assert approxQuery instanceof MatchAllDocsQuery;
// Can happen when approxQuery resolves to some form of MatchAllDocs expression
return false;
}
BytesRef arrayOfValues = values.binaryValue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ private void expectPrefixMatch(IndexSearcher searcher, String term,long count) t
assertThat(td.totalHits.value, equalTo(count));
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/78949")
public void testSearchResultsVersusKeywordField() throws IOException {
Directory dir = newDirectory();
IndexWriterConfig iwc = newIndexWriterConfig(WildcardFieldMapper.WILDCARD_ANALYZER_7_10);
Expand Down