Created
June 11, 2014 19:19
-
-
Save blooberr/0ea66f9676a7b987b44a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
myhost = "localhost" | |
@es = Elasticsearch::Client.new host: myhost, port: 9200, log: true | |
@es.create index: "hello", | |
type: "world", | |
id: "someitem", | |
body: { | |
text: "yup", | |
count: 1 | |
} | |
@es.indices.put_alias index: "hello", name: "alias-hello" | |
@es.search index: "alias-hello" | |
@es.indices.close index: "alias-hello" | |
@es.search index: "alias-hello", ignore_unavailable: true ## throws error | |
@es.search index: "xxxxzzzzwrongindex", ignore_unavailable: true ## doesn't throw error. Expected behavior. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment