Skip to content

Instantly share code, notes, and snippets.

@klausbrunner
Created October 7, 2014 08:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save klausbrunner/9016653829d295ae96f2 to your computer and use it in GitHub Desktop.
Save klausbrunner/9016653829d295ae96f2 to your computer and use it in GitHub Desktop.
Elasticsearch boolean multifield silently ignored #6587
curl -XGET 'http://localhost:9200/'
#{
# "status" : 200,
# "name" : "Spider-Man",
# "version" : {
# "number" : "1.3.2",
# "build_hash" : "dee175dbe2f254f3f26992f5d7591939aaefd12f",
# "build_timestamp" : "2014-08-13T14:29:30Z",
# "build_snapshot" : false,
# "lucene_version" : "4.9"
# },
# "tagline" : "You Know, for Search"
#}
curl -XPUT 'http://localhost:9200/test1/'
curl -XPUT 'http://localhost:9200/test1/tweet/_mapping' -d '
{
"tweet": {
"properties": {
"flag": {
"type": "boolean",
"store": true,
"fields": {
"untouched": {
"type": "boolean",
"index": "no"
}
}
}
}
}
}
'
curl -XPUT 'http://localhost:9200/test1/tweet/_mapping' -d '
{
"tweet": {
"properties": {
"message": {
"type": "string",
"store": true,
"fields": {
"untouched": {
"type": "string",
"index": "no"
}
}
}
}
}
}
'
curl -XGET 'http://localhost:9200/test1/_mapping/tweet?pretty=true'
# it works for the string field, but not for the boolean:
#
#{
# "test1" : {
# "mappings" : {
# "tweet" : {
# "properties" : {
# "flag" : {
# "type" : "boolean",
# "store" : true
# },
# "message" : {
# "type" : "string",
# "store" : true,
# "fields" : {
# "untouched" : {
# "type" : "string",
# "index" : "no"
# }
# }
# }
# }
# }
# }
# }
#}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment