Skip to content

Instantly share code, notes, and snippets.

@mando
Created May 2, 2012 18:34
Show Gist options
  • Save mando/2579040 to your computer and use it in GitHub Desktop.
Save mando/2579040 to your computer and use it in GitHub Desktop.
Mappings and such
[~]$ curl -XDELETE 'http://localhost:9200/tumblr' [ruby-1.9.3-p194@lab]
{"ok":true,"acknowledged":true}%
[~]$ cat mapping.json [ruby-1.9.3-p194@lab]
{ "mappings": {
"text": {
"properties": {
"blog_name": {"type": "string", "index":"not_analyzed"},
"timestamp": {"type": "date"}
}
},
"audio": {
"properties": {
"blog_name": {"type": "string", "index":"not_analyzed"},
"timestamp": {"type": "date"}
}
},
"quote": {
"properties": {
"blog_name": {"type": "string", "index":"not_analyzed"},
"timestamp": {"type": "date"}
}
},
"link": {
"properties": {
"blog_name": {"type": "string", "index":"not_analyzed"},
"timestamp": {"type": "date"}
}
},
"answer": {
"properties": {
"blog_name": {"type": "string", "index":"not_analyzed"},
"timestamp": {"type": "date"}
}
},
"chat": {
"properties": {
"blog_name": {"type": "string", "index":"not_analyzed"},
"timestamp": {"type": "date"}
}
},
"photo": {
"properties": {
"blog_name": {"type": "string", "index":"not_analyzed"},
"timestamp": {"type": "date"}
}
},
"video": {
"properties": {
"blog_name": {"type": "string", "index":"not_analyzed"},
"timestamp": {"type": "date"}
}
}
}
}
[~]$ curl -XPUT 'http://localhost:9200/tumblr' -d @mapping.json [ruby-1.9.3-p194@lab]
{"ok":true,"acknowledged":true}%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment