-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Remove suggest transport action #17198
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
Remove suggest transport action #17198
Conversation
24ea4da
to
ca47653
Compare
+100 for the diff stats :) |
@areek this only breaks the java API right? |
@s1monw yes, and the |
I was more curious about the REST endpoints but I guess I will see in a second when I am reviewing :) |
/** | ||
* @return true if the request only has suggest | ||
*/ | ||
public boolean hasOnlySuggest() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we name this isSuggestOnly()
?
I left some minor comments - this looks fantastic! Please add the stats change to the breaking docs too. thanks so much for this cleanup |
08095e8
to
92e5f6f
Compare
Thanks @s1monw for the review! I added breaking docs for the java api and merging suggest stats into search stats. |
+1 on removing suggest threadpool |
LGTM - awesome lets remove the threadpool in a sep PR, we also need a breaking doc addition for that |
d32c1f4
to
f0a182e
Compare
We skip context preprocessing and only execute suggest phase for suggest-only requests
f0a182e
to
442a6e0
Compare
Thanks @s1monw for the review! I will open a PR for removing suggest threadpool |
In elastic#17198, we removed suggest transport action, which used the `suggest` threadpool to execute requests. Now `suggest` threadpool is unused and suggest requests are executed on the `search` threadpool.
Currently
suggest
through_search
&_suggest
endpoints use different transport actions.The
_suggest
endpoint uses its own transport action to avoid executing search & aggregrationphases. This change removes dedicated suggest transport action and adds optimization to
shortcut to suggest phase when
_search
endpoint is used exclusively for suggestions.This implies:
is actually sugar for:
Besides reducing code and complexity of dealing with multiple execution paths for suggest,
this change has two major benefits:
completion
post_filter
/query
for filtering suggestions incompletion
completion
can respect_type
(through contexts)phrase
suggester parametersAPI Changes:
This change removes
suggest
action from the client API:is equivalent to:
Behaviour changes:
now we use the
search
threadpool instead ofsuggest
for suggest-only requests(would appreciate some feedback there) and the merged suggest stats are representative
of all suggest-only requests either from
_suggest
or_search
endpointsrelates to #10217
simplifies #13576