-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Add snippet for the search_type query parameter #43540
Add snippet for the search_type query parameter #43540
Conversation
Pinging @elastic/es-search |
Pinging @elastic/es-docs |
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.
@EmmanuelDemey Thanks for you contribution! Indeed having examples here would be very helpful. Can you please address comments to ensure the snippets are testable.
-------------------------------------------------- | ||
GET twitter/_search?search_type=query_then_fetch | ||
-------------------------------------------------- | ||
|
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.
Let's make this example executable/testable by adding CONSOLE
. This ensures that the snippet will be executed/tested. We will also need to setup the index with data for the test and for this we can use TEST[setup:twitter]
.
So, the overall snippet can look like this:
[source,js]
--------------------------------------------------
GET twitter/_search?search_type=query_then_fetch
--------------------------------------------------
// CONSOLE
// TEST[setup:twitter]
[source,js] | ||
-------------------------------------------------- | ||
GET twitter/_search?search_type=dfs_query_then_fetch | ||
-------------------------------------------------- |
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.
similar comment here
hi @EmmanuelDemey would you have time to address the comments you got above? Thanks! |
@javanna sorry for the delay. I have just pushed the change. |
@elasticmachine test this please |
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.
@EmmanuelDemey Thanks for your PR
@elasticmachine update branch |
@elasticmachine test this please |
No description provided.