-
-
Save mustafayildirim/fe8871d876f164d4f076404d00ee7f11 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DELETE /test | |
| PUT /test | |
| { | |
| "mappings": { | |
| "person": { | |
| "properties": { | |
| "name": { "type": "string" }, | |
| "attributes": { | |
| "type": "nested", | |
| "properties": { | |
| "name": { "type": "string", "index": "not_analyzed" }, | |
| "value": { "type": "string", "index": "not_analyzed" } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| PUT /test/person/1 | |
| { | |
| "name": "Adrien Grand", | |
| "attributes": [ | |
| { | |
| "name": "height", | |
| "value": "180cm" | |
| } | |
| ] | |
| } | |
| PUT /test/person/2 | |
| { | |
| "name": "John Smith", | |
| "attributes": [ | |
| { | |
| "name": "height", | |
| "value": "185cm" | |
| }, | |
| { | |
| "name": "weight", | |
| "value": "82kg" | |
| } | |
| ] | |
| } | |
| POST /test/_refresh | |
| GET /test/person/_search | |
| { | |
| "aggs": { | |
| "attributes": { | |
| "nested": { | |
| "path": "attributes" | |
| }, | |
| "aggs": { | |
| "name_counts": { | |
| "terms": { | |
| "field": "attributes.name" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment