Create a gist now

Instantly share code, notes, and snippets.

Sample Data Elasticsearch Aliasing Feature
POST /test
POST /test/test/1
{
"id": 1,
"type": "search",
"keywords": ["elasticsearch", "elastic", "framework"]
}
POST /test/test/2
{
"id": 2,
"type": "search",
"keywords": ["solr", "lucene", "framework"]
}
POST /test/test/3
{
"id": 3,
"type": "search",
"keywords": ["sphinx", "opensource", "framework"]
}
POST /test/test/4
{
"id": 4,
"type": "client",
"keywords": ["golang", "elasticsearch"]
}
POST /test/test/5
{
"id": 5,
"type": "client",
"keywords": ["php", "elasticsearch"]
}
POST /_aliases
{
"actions": [
{
"add": {
"index": "test",
"alias": "test_client",
"filter": {
"term": {
"type": "search"
}
}
}
}
]
}
GET /test/_search
GET /test_client/_search
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment