How to modify scores in SearchResponse object?

(Rahul Sharma) #1

I am trying to implement a social feature, and I would need to modify the scores in SearchResponse (SearchHit) object based on external signals.

Please let me know how can this be done.

Thanks in advance.


(David Pilato) #2

If the data which will modify the score is part of your document, then you can use function_score to do it.

If you have an external system, then I think you need to write a script as a Java plugin and call it from function_score.

Calling an external system will dramatically slowdown your system though. Might not be the best solution here.

(system) #3