-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
CompletionSuggester can return partial information (no _id and _score) #32467
Comments
Pinging @elastic/es-search-aggs |
The TODO comment is about adding a verification that the fetch phase really failed on the node (e.g. checking the shard failures). If the fetch phase failed on one node we don't have many options especially if the node is gone. When the same situation happens in normal search we simply remove the hit from the response. We should probably do the same for suggestions. Note that the failure is reported in the response inside the |
Thanks for looking into this! For us it happens during short spikes where we can see few thousands of responses broken like that (we serve between 500 and 1000 qps with this endpoint). As for the possible solutions to fix this, I think that the main problem here is that a client may be confused to not see the usual data when using the For now we'll deploy a workaround by just inspecting the hits array and discard the response if it does not contain all the necessary info. This bug is not really a big deal per se, just confusing. Thanks! |
Chatted about this in Fixit Thursday, although we weren't quite sure of the technical details. @jimczi is it correct to say that these "partial" results can happen because we identify a suggestion during the search phase, merge all the shard results but a failure in the fetch phase means we can't enrich it with extra metadata? If that's roughly correct, we agreed that hiding the partial suggestions would be the most consistent thing to do. 👍 Seems very trappy for clients to get back partially-formed results... would be similar to search hits missing important metadata or parts of the document. |
+1, thanks @polyfractal |
Pinging @elastic/es-search (Team:Search) |
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
We are seeing this behavior from times to times, we see a spike on invalid responses returned by the completion suggester: the options returned may be "partial".
By partial response I mean that the individual hits are not provided with the usual information retrieved during the fetch_phase.
In this case only
text
seems to be available,_id
and_score
are not populated.I'm almost sure that this happens only when a node was dropped from the cluster or during a rolling restart.
Looking at the code this behavior seems to line-up with a TODO comment in SearchPhaseController.java where a failure during the fetch phase may produce this inconsistency.
The text was updated successfully, but these errors were encountered: