Last active
June 20, 2016 08:33
-
-
Save hkulekci/2146c1da124e42cd02ed3c4635934f62 to your computer and use it in GitHub Desktop.
Sample Data Elasticsearch Aliasing Feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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