# Custom Scoring in ElasticSearch

**URL:** <https://discuss.elastic.co/t/custom-scoring-in-elasticsearch/19909>\
**Category:** Elasticsearch\
**Created:** [September 22, 2014, 11:42am UTC](https://discuss.elastic.co/t/custom-scoring-in-elasticsearch/19909 "2014-09-22T11:42:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElasticSearch\_Users\_](https://avatars.discourse-cdn.com/v4/letter/e/b4bc9f/32.png) [@ElasticSearch\_Users\_](https://discuss.elastic.co/u/ElasticSearch_Users_)\
**Post date:** [September 22, 2014, 11:42am UTC](https://discuss.elastic.co/t/custom-scoring-in-elasticsearch/19909/1 "2014-09-22T11:42:21Z")

</div>

Hi,

I have a list of terms and I want to submit a TermsQuery for a document  
corpus for a field that is multi-valued.

When I get the set of matching results, I want to make sure that I use my  
own logic for scoring so that the Top N reflects my view of which documents  
should be top rated.

Is there a plugin, a scripting function, or a built-in method to achieve  
this?

My custom scoring function will look at a few aspects like determining  
which terms in the input are more important than the rest and what size of  
the document should be matched first, whether my list of terms is a  
complete subset of a document and if that document has other terms or not,  
etc.

Please let me know! Thanks,

Thanks,  
Sandeep

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/75f7f5d1-3378-4f22-9034-cb2512fa3fc6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/75f7f5d1-3378-4f22-9034-cb2512fa3fc6%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:00am UTC](https://discuss.elastic.co/t/custom-scoring-in-elasticsearch/19909/2 "2017-07-06T01:00:43Z")

</div>


