Switch to keyword/text type, add refresh parameter

This commit is contained in:
Isabel Drost-Fromm 2016-05-18 10:03:38 +02:00
parent 48ea9137da
commit 8016a2f951
1 changed files with 3 additions and 5 deletions

View File

@ -16,12 +16,10 @@ PUT /my_index
"properties": { "properties": {
"post_date": { "type": "date" }, "post_date": { "type": "date" },
"user": { "user": {
"type": "string", "type": "keyword"
"fielddata": "true"
}, },
"name": { "name": {
"type": "string", "type": "keyword"
"fielddata": "true"
}, },
"age": { "type": "integer" } "age": { "type": "integer" }
} }
@ -94,7 +92,7 @@ the average price per document.
[source,js] [source,js]
-------------------------------------------------- --------------------------------------------------
PUT /my_index/my_type/1 PUT /my_index/my_type/1?refresh
{ {
"product": "chocolate", "product": "chocolate",
"price": [20, 4] "price": [20, 4]