Open bpintea opened 3 weeks ago
Pinging @elastic/es-search-relevance (Team:Search Relevance)
Pinging @elastic/es-search (Team:Search)
It is strange that field caps is making a semantic query at all :/ I wonder what is going on there.
LOL, looking at the comments on that line of code this is throwing on:
// This should never happen, but throw on it in case it ever does
throw new IllegalStateException(
"No inference results set for [" + semanticTextFieldType.typeName() + "] field [" + fieldName + "]"
);
The curse of "This should never happen" has struck again!
@Mikep86 @carlosdelest ^ I wonder if this is because FieldCaps isn't rewriting queries like we expect for can_match?
Basically, field_caps allows index_filter
which does a can_match
phase to determine if all the shards for a given index will rewrite to a match_none
.
This makes me wonder if we should return a MatchAllQuery
if inference results is null
?
++, smells like a missing rewrite to me. It's plausible that we missed this during testing since the can_match phase is skipped most of the time.
Description
For a
_field_caps
request withparams: {types=, ignore_unavailable=true, expand_wildcards=open, allow_no_indices=true, index=*,-.*, serverlessRequest=true, include_empty_fields=false}
, resulting in astatus: 500
, the following suppressed exception is logged: