Skip to content

Commit

Permalink
Use new body specification for analyze API
Browse files Browse the repository at this point in the history
  • Loading branch information
polyfractal committed Jun 3, 2016
1 parent 2ad9bda commit 815434a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
14 changes: 10 additions & 4 deletions 100_Full_Text_Search/30_Controlling_analysis.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 10 additions & 2 deletions snippets/100_Full_Text_Search/30_Analysis.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 815434a

Please sign in to comment.