You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ESQL: Document warnings behavior in CsvTests (#125441) (#125501)
The `CsvTests` has a slight difference regarding warnings from real
Elasticsearch indices and this is worth documenting. I've also added an
explanation to `SingleValueMatchQuery` that explains *exactly* when it
makes a warning because it's not *exactly* the same as when the compute
engine would make a warning. The resulting documents are the same - but
the warnings are not.
Copy file name to clipboardexpand all lines: x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/querydsl/query/SingleValueMatchQuery.java
+11-1
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,17 @@
37
37
importjava.util.Objects;
38
38
39
39
/**
40
-
* Finds all fields with a single-value. If a field has a multi-value, it emits a {@link Warnings}.
40
+
* Finds all fields with a single-value. If a field has a multi-value, it emits
41
+
* a {@link Warnings warning}.
42
+
* <p>
43
+
* Warnings are only emitted if the {@link TwoPhaseIterator#matches}. Meaning that,
44
+
* if the other query skips the doc either because the index doesn't match or because it's
45
+
* {@link TwoPhaseIterator#matches} doesn't match, then we won't log warnings. So it's
46
+
* most safe to say that this will emit a warning if the document would have
47
+
* matched but for having a multivalued field. If the document doesn't match but
48
+
* "almost" matches in some fairly lucene-specific ways then it *might* emit
0 commit comments