Created
December 20, 2016 08:01
-
-
Save mykoweb/e3e492f7856fe0f6084224c9f0911b9e to your computer and use it in GitHub Desktop.
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
req_body_for_patient_a = { | |
routing: 'PatientA', | |
filter: { | |
term: { patient_name: 'PatientA' } | |
} | |
} | |
req_body_for_patient_b = { | |
routing: 'PatientB', | |
filter: { | |
term: { patient_name: 'PatientB' } | |
} | |
} | |
raw_put 'patients/_alias/PatientA', req_body_for_patient_a | |
raw_put 'patients/_alias/PatientB', req_body_for_patient_b | |
client.indices.exists_alias? name: 'PatientA' # => true | |
client.indices.exists_alias? name: 'PatientB' # => true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment