Skip to content

Instantly share code, notes, and snippets.

@zaiste zaiste/step1
Last active Aug 29, 2015

Embed
What would you like to do?
PUT /wizards
{
"mappings": {
"wizard": {
"properties": {
"birthdate": {
"type": "date",
"format": "dateOptionalTime"
},
"location": {
"type": "geo_point"
},
"name": {
"type": "string",
"properties": {
"raw": {
"type": "string",
"index": "not_analyzed"
}
}
},
"rating": {
"type": "integer"
},
"domain": {
"type": "string"
}
}
}
}
}
POST /wizards/_bulk
{"index":{"_index":"wizards","_type":"wizard"}}
{"name":"John Smith", "birthdate":"1986-10-11", "rating": ["5", "4"], "domain":"Programmer", "location":"46.23,-63.45"}
{"index":{"_index":"wizards","_type":"wizard"}}
{"name":"Tom Johnson", "birthdate":"1987-01-22", "rating": ["3", "4"], "domain":"Slicer", "location":"44.21,-62.35"}
{"index":{"_index":"wizards","_type":"person"}}
{"name":"Anne Kabinsky", "birthdate":"1984-01-22", "rating": ["5", "5"], "domain":"Programmer", "location":"44.21,-62.35"}
{"index":{"_index":"wizards","_type":"person"}}
{"name":"Lydia Marceau", "birthdate":"1982-01-22", "rating": ["1", "5", "3"], "domain":"Designer", "location":"44.22,-62.39"}
{"index":{"_index":"wizards","_type":"person"}}
{"name":"Carol Tyler", "birthdate":"1989-01-22", "rating": ["2", "3"], "domain":"Designer", "location":"43.21,-61.35"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.