Skip to content

Instantly share code, notes, and snippets.

@umeshdangat
Last active November 12, 2016 22:45
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 umeshdangat/43b10532dc52c5d92c1a2d7aaf8c0d8c to your computer and use it in GitHub Desktop.
Save umeshdangat/43b10532dc52c5d92c1a2d7aaf8c0d8c to your computer and use it in GitHub Desktop.
Index docs with binary field type
curl -s -XPUT "http://localhost:9200/testindex/" -d '{
"settings": {
"index.number_of_shards": 1,
"index.number_of_replicas": 0
},
"mappings": {
"test":{"_all":{"enabled":false},
"properties":{
"qa_data":{"type":"binary", "doc_values": true}
}
}
}
}'
curl -s -XPUT 'http://localhost:9200/testindex/test/3' -d '{
"qa_data" : "AAAAAgAAAAAAAAP1P/AAAAAAAABAAAAAAAAAAAAAAAAAAAMqQCIAAAAAAABAMQAAAAAAAA=="
}'
curl -s -XPUT 'http://localhost:9200/testindex/test/4' -d '{
"qa_data" : "AAAABgAAAAAAAAAAQBgAAAAAAABAKgAAAAAAAAAAAAAAAAABQCgAAAAAAABAMQAAAAAAAAAAAAAAAAACQAAAAAAAAABAMAAAAAAAAAAAAAAAAAADP/AAAAAAAAA/8AAAAAAAAAAAAAAAAAAEAAAAAAAAAABAFAAAAAAAAAAAAAAAAAAFP/AAAAAAAABAFAAAAAAAAA=="}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment