Created
August 20, 2014 10:02
-
-
Save radu-gheorghe/cd7d37b4f3b0327fe706 to your computer and use it in GitHub Desktop.
boost specific titles
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
{ | |
"query": { | |
"function_score": { | |
"query": { | |
"multi_match": { | |
"query": "gospel", | |
"fields": [ | |
"title.raw^60", | |
"authors.raw^40", | |
"subjects.raw^20", | |
"title", | |
"authors", | |
"subjects" | |
] | |
} | |
}, | |
"functions": [ | |
{ | |
"filter": { | |
"term": { | |
"_id": "promoted_gosped_book" | |
} | |
}, | |
"boost_factor": 5 | |
} | |
] | |
} | |
} | |
} |
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
{ | |
"query": { | |
"bool": { | |
"must": { | |
"multi_match": { | |
"query": "gospel", | |
"fields": [ | |
"title.raw^60", | |
"authors.raw^40", | |
"subjects.raw^20", | |
"title", | |
"authors", | |
"subjects" | |
] | |
} | |
}, | |
"should": { | |
"match": { | |
"title.raw": { | |
"query": "promoted gospel book", | |
"boost": 5 | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment