Last active
July 28, 2017 13:10
-
-
Save allizad/080e300aae9d27eb6b14b365ab742b62 to your computer and use it in GitHub Desktop.
Tuning Elasticsearch results
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
POST /_search | |
{ | |
"_source": [ "title", "weight" ], | |
"query": { | |
"bool": { | |
"must": { | |
"multi_match": { | |
"query": "Upgrade", | |
"fields": [ | |
"title^16", | |
"content_text^4", | |
"display_tags^8" | |
], | |
"operator": "OR", | |
"type": "cross_fields" | |
} | |
} | |
} | |
}, | |
"rescore": { | |
"window_size": 100, | |
"query": { | |
"rescore_query": { | |
"function_score": { | |
"field_value_factor": { | |
"field": "weight" | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment