Skip to content

Commit

Permalink
Fix error parsing for dates in MultiMatchQuery (#36742)
Browse files Browse the repository at this point in the history
Closes #36598
  • Loading branch information
mayya-sharipova authored Feb 6, 2019
1 parent f92ab42 commit 33d582b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,13 @@ static Query blendTerms(QueryShardContext context, BytesRef[] values, Float comm
continue;
} catch (ElasticsearchParseException parseException) {
// date fields throw an ElasticsearchParseException with the
// underlying IAE as the cause, ignore this field if that is
// underlying IAE as the root cause, ignore this field if that is
// the case
if (parseException.getCause() instanceof IllegalArgumentException) {
Throwable cause = parseException;
while (cause.getCause() != null && cause.getCause() != cause) {
cause = cause.getCause();
};
if (cause instanceof IllegalArgumentException) {
continue;
}
throw parseException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -511,15 +511,4 @@ private static IndexMetaData newIndexMeta(String name, Settings oldIndexSettings
.build();
return IndexMetaData.builder(name).settings(build).build();
}


@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/36598")
@Override
public void testMustRewrite() throws IOException {
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/36598")
@Override
public void testToQuery() throws IOException {
}
}

0 comments on commit 33d582b

Please sign in to comment.