Last active
April 5, 2016 15:53
-
-
Save rsimon/770cfb3da5ad7a9046938f934ce2478b 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
{ | |
"size" : 5, | |
"query" : { | |
"nested" : { | |
"path" : "is_conflation_of", | |
"query" : { | |
"bool": { | |
"should": [ | |
{ "match" : { "is_conflation_of.title": "athenae" } }, | |
{ | |
"nested" : { | |
"path": "is_conflation_of.names", | |
"query": { | |
"match" : { "is_conflation_of.names.name": { "boost": 2, "query": "athenae" } } | |
} | |
} | |
}, | |
{ | |
"nested" : { | |
"path": "is_conflation_of.descriptions", | |
"query": { | |
"match" : { "is_conflation_of.descriptions.description": "athenae" } | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
"sort": { | |
"_script": { | |
"script": "_source.is_conflation_of.size()", | |
"order": "desc", | |
"type": "number" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Query that searches by place name (with double boost), title and description, sorting by number of gazetteers that hold the place. (Our future standard search query in Recogito?)