From 815434a32a07aa0bdc08e08d69ba83cc8e3b7c06 Mon Sep 17 00:00:00 2001 From: Zachary Tong Date: Fri, 3 Jun 2016 13:59:32 -0400 Subject: [PATCH] Use new body specification for analyze API Related to #509 --- .../30_Controlling_analysis.asciidoc | 14 ++++++++++---- snippets/100_Full_Text_Search/30_Analysis.json | 12 ++++++++++-- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/100_Full_Text_Search/30_Controlling_analysis.asciidoc b/100_Full_Text_Search/30_Controlling_analysis.asciidoc index d5a2091d1..fffd6bb93 100644 --- a/100_Full_Text_Search/30_Controlling_analysis.asciidoc +++ b/100_Full_Text_Search/30_Controlling_analysis.asciidoc @@ -34,11 +34,17 @@ analyzed at index time by using the `analyze` API to analyze the word `Foxes`: [source,js] -------------------------------------------------- -GET /my_index/_analyze?field=my_type.title <1> -Foxes +GET /my_index/_analyze +{ + "field": "my_type.title", <1> + "text": "Foxes" +} -GET /my_index/_analyze?field=my_type.english_title <2> -Foxes +GET /my_index/_analyze +{ + "field": "my_type.english_title", <2> + "text": "Foxes" +} -------------------------------------------------- // SENSE: 100_Full_Text_Search/30_Analysis.json diff --git a/snippets/100_Full_Text_Search/30_Analysis.json b/snippets/100_Full_Text_Search/30_Analysis.json index 76e316e2f..2a692c217 100644 --- a/snippets/100_Full_Text_Search/30_Analysis.json +++ b/snippets/100_Full_Text_Search/30_Analysis.json @@ -22,10 +22,18 @@ PUT /my_index } # Test the analysis of the `title` field -GET /my_index/_analyze?field=my_type.title&text=Foxes +GET /my_index/_analyze +{ + "field": "my_type.title", <1> + "text": "Foxes" +} # Test the analysis of the `english_title` field -GET /my_index/_analyze?field=my_type.english_title&text=Foxes +GET /my_index/_analyze +{ + "field": "my_type.english_title", <2> + "text": "Foxes" +} # Get query explanation for `title` vs `english_title` GET /my_index/my_type/_validate/query?explain