Mark filtered query example as not to be used (#25661)
The Filtered Query has been deprecated in favour of the Bool Query with a filter context. However, this deleted page for the Filtered Query is often ranked highly in search results when searching for documentation on "filtered queries". Often people just copy the first code snippet they see, which in this case is the INCORRECT syntax (the correct syntax follows). I think reordering the examples would help avoid a lot of confusion (I have seen people make this same mistake 3 times now) Adding a comment to indicate that the first example shouldn't be used
This commit is contained in:
parent
c8777c4c2e
commit
4f0dc5bf32
|
@ -371,6 +371,7 @@ the following:
|
||||||
|
|
||||||
[source,js]
|
[source,js]
|
||||||
-------------------------
|
-------------------------
|
||||||
|
## INCORRECT - DEPRECATED SYNTAX, DO NOT USE
|
||||||
GET _search
|
GET _search
|
||||||
{
|
{
|
||||||
"query": {
|
"query": {
|
||||||
|
@ -496,4 +497,4 @@ guide to the {painless}/index.html[Painless Scripting Language].
|
||||||
=== Painless API Reference
|
=== Painless API Reference
|
||||||
|
|
||||||
See the {painless}/painless-api-reference.html[Painless API Reference] in
|
See the {painless}/painless-api-reference.html[Painless API Reference] in
|
||||||
the guide to the {painless}/index.html[Painless Scripting Language].
|
the guide to the {painless}/index.html[Painless Scripting Language].
|
||||||
|
|
Loading…
Reference in New Issue