Last active
September 11, 2017 18:21
-
-
Save devth/d1f271bf9c43f25ec586715424544892 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
es_query() { | |
port="${port?$port must be set}" | |
pass="${pass?$pass must be set}" | |
query="${1?Query argument is required}" | |
curl -i -u "elastic:$pass" -XGET \ | |
-H 'Content-Type: application/json' \ | |
"https://localhost:$port/patient/_search?pretty" -d " | |
{ | |
\"query\": { | |
\"match\": { | |
\"_all\": \"$query\" | |
} | |
} | |
}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment