Skip to content

Instantly share code, notes, and snippets.

@patcito
Last active August 29, 2015 13:56
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 patcito/281143ee4f440171c875 to your computer and use it in GitHub Desktop.
Save patcito/281143ee4f440171c875 to your computer and use it in GitHub Desktop.
elasticsearch attachments
// When I try to map a field to have type attachment:
curl -XPUT 'http://127.0.0.1:9200/myapp/?pretty=1' -d '
{
"mappings" : {
"doc" : {
"properties" : {
"file" : {
"type" : "attachment"
}
}
}
}
}
'
// I get:
{
"error" : "IndexAlreadyExistsException[[myapp] Already exists]",
"status" : 400
}
// is there a way to add this without deleting the index or
// at least without deleting all the docs? Thanks in advance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment