Browse Source

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
Bodecker DellaMaria 8 years ago
parent
commit
4f0dc5bf32
1 changed files with 2 additions and 1 deletions
  1. 2 1
      docs/reference/redirects.asciidoc

+ 2 - 1
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].
+the guide to the {painless}/index.html[Painless Scripting Language].