Skip to content
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

Merged
merged 3 commits into from
Aug 11, 2019

Conversation

EmmanuelDemey
Copy link
Contributor

@EmmanuelDemey EmmanuelDemey commented Jun 24, 2019

No description provided.

@polyfractal polyfractal added :Search/Search Search-related issues that do not fall into other categories >docs General docs changes labels Jun 24, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs

Copy link
Contributor

@mayya-sharipova mayya-sharipova left a 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
--------------------------------------------------

Copy link
Contributor

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
--------------------------------------------------
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar comment here

@javanna
Copy link
Member

javanna commented Aug 6, 2019

hi @EmmanuelDemey would you have time to address the comments you got above? Thanks!

@EmmanuelDemey
Copy link
Contributor Author

@javanna sorry for the delay. I have just pushed the change.

@mayya-sharipova
Copy link
Contributor

@elasticmachine test this please

Copy link
Contributor

@mayya-sharipova mayya-sharipova left a 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

@mayya-sharipova
Copy link
Contributor

@elasticmachine update branch

@mayya-sharipova
Copy link
Contributor

@elasticmachine test this please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes :Search/Search Search-related issues that do not fall into other categories v7.4.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants