Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I have a field say "testField", where in there can be numerous string values like. I need to boost the score whenever the value in the field is a particular string,say for example "testValue". How can I do this in elasticsearch?
You can try using function_score:
function_score
{ "query": { "function_score": { "query": { "match_all": {} }, "functions": [ { "filter": { "term": { "testField": "testValue" } }, "boost_factor": 15 } ] } } }
Add a comment
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.