-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
[DOCS] Reformat match phrase prefix query #45209
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.
@jrodewig Thanks, nice reorganization!
[[match-phrase-prefix-query-ex-request]] | ||
==== Example request | ||
|
||
The following search returns documents that phrases beginning with `quick brown |
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.
documents that phrases -> documents that contain phrases?
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.
Fixed with 8f391fa.
==== Notes | ||
|
||
[[match-phrase-prefix-autocomplete]] | ||
===== Avoid using the match phrase prefix query for search autocompletion |
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.
I think "avoid" is a strong word here. I would rather say "Prefer not using". Because for some use cases (for a quick start etc), it is a valid use case.
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.
I've changed this heading to "Using..." with bb2e045. This will make the nuance of that use case a bit more clear and encourage users to read the block.
While easy to set up, using the `match_phrase_prefix` query for search | ||
autocompletion can sometimes produce confusing results. | ||
|
||
For example, consider the query string `quick brown f`. This query works by |
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.
f`. This
brown
). Then
nit: are there two spaces after .
?
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.
Good catch. Fixed with 91cfead.
Thanks @mayya-sharipova. |
Updates the
match_phrase_prefix
query to use the new query format.This creates separate sections for the example request, parameters, and notes.
This is part of #40977, an effort to standardize documentation for query types.
Preview
http://elasticsearch_45209.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/query-dsl-match-query-phrase-prefix.html