Created
October 29, 2014 15:09
-
-
Save loren/7741c52bd8e74d7ef626 to your computer and use it in GitHub Desktop.
Recognize proximity of words
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
{ | |
"bool": { | |
"should": [ | |
{ | |
"match": { | |
"tags": { | |
"query": "jefferson memorial", | |
"analyzer": "tag_analyzer" | |
} | |
} | |
}, | |
{ | |
"simple_query_string": { | |
"fields": [ | |
"title", | |
"description", | |
"caption" | |
], | |
"query": "jefferson memorial", | |
"analyzer": "en_analyzer", | |
"default_operator": "AND" | |
} | |
}, | |
{ | |
"match_phrase": { | |
"title": "jefferson memorial" | |
} | |
}, | |
{ | |
"match_phrase": { | |
"description": "jefferson memorial" | |
} | |
}, | |
{ | |
"match_phrase": { | |
"caption": "jefferson memorial" | |
} | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment