Skip to content

[DOCS] Reformat script query#44882

Merged
jrodewig merged 4 commits intomasterfrom
script-query
Jul 29, 2019
Merged

[DOCS] Reformat script query#44882
jrodewig merged 4 commits intomasterfrom
script-query

Conversation

@jrodewig
Copy link
Copy Markdown
Contributor

@jrodewig jrodewig commented Jul 25, 2019

Rewrites the script query to use the new query format.

This creates separate sections for the example request and parameters

This is part of #40977, an effort to standardize documentation for query types.

Preview

http://elasticsearch_44882.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/query-dsl-script-query.html

@jrodewig jrodewig added >docs General docs changes :Search/Search Search-related issues that do not fall into other categories v8.0.0 v7.0.2 v7.1.2 v7.4.0 v7.3.1 v7.2.2 labels Jul 25, 2019
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-docs

@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-search

Copy link
Copy Markdown
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.

Thanks @jrodewig


Accepts another query as a <<modules-scripting-using,script>>. `script` queries
are typically used in a <<query-filter-context,filter context>>.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Accepts another query as a <<modules-scripting-using,script>>

It doesn't really accept another query. I would rather say as it was before or something like:

"script_query is used to filter documents based on the provided script. They are typically used in a filter context."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks @mayya-sharipova! Fixed with 08bc253.


`script`::
(Required, <<modules-scripting-using, script object>>) Contains a script to run
as a query.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

May be worth to add that the script must return a boolean value, true or false.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added with 021a9cc.

@jrodewig jrodewig merged commit 3be9a3b into master Jul 29, 2019
@jrodewig jrodewig deleted the script-query branch July 29, 2019 13:59
jrodewig added a commit that referenced this pull request Jul 29, 2019
jrodewig added a commit that referenced this pull request Jul 29, 2019
jrodewig added a commit that referenced this pull request Jul 29, 2019
jrodewig added a commit that referenced this pull request Jul 29, 2019
jrodewig added a commit that referenced this pull request Jul 29, 2019
jkakavas pushed a commit that referenced this pull request Jul 31, 2019
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.0.2 v7.1.2 v7.2.2 v7.3.1 v7.4.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants