From 4f0dc5bf3271119b0fe65579b1192034fa92e875 Mon Sep 17 00:00:00 2001 From: Bodecker DellaMaria Date: Fri, 14 Jul 2017 02:44:46 -0700 Subject: [PATCH] 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 --- docs/reference/redirects.asciidoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/reference/redirects.asciidoc b/docs/reference/redirects.asciidoc index 992de9cd63f..2e2967d4efa 100644 --- a/docs/reference/redirects.asciidoc +++ b/docs/reference/redirects.asciidoc @@ -371,6 +371,7 @@ the following: [source,js] ------------------------- +## INCORRECT - DEPRECATED SYNTAX, DO NOT USE GET _search { "query": { @@ -496,4 +497,4 @@ guide to the {painless}/index.html[Painless Scripting Language]. === Painless API Reference See the {painless}/painless-api-reference.html[Painless API Reference] in -the guide to the {painless}/index.html[Painless Scripting Language]. \ No newline at end of file +the guide to the {painless}/index.html[Painless Scripting Language].