Last active
June 14, 2018 01:31
-
-
Save geekpete/3af4b6789292dc1ce60a9812731ed99e to your computer and use it in GitHub Desktop.
multimatch across two indices
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
DELETE /index1,index2/ | |
POST /index1/doc | |
{ | |
"field1": "dog" | |
} | |
POST /index2/doc | |
{ | |
"field2": "cat" | |
} | |
POST /index1/doc | |
{ | |
"field1": "cow" | |
} | |
POST /index2/doc | |
{ | |
"field2": "horse" | |
} | |
POST /index2/doc | |
{ | |
"field2": "dog" | |
} | |
GET /index1,index2/_search | |
{ | |
"query": { | |
"multi_match" : { | |
"query": "dog", | |
"fields": [ "field1", "field2" ] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment