# Custom ScoreFunctionParser?

**URL:** <https://discuss.elastic.co/t/custom-scorefunctionparser/21256>\
**Category:** Elasticsearch\
**Created:** [December 15, 2014, 12:57pm UTC](https://discuss.elastic.co/t/custom-scorefunctionparser/21256 "2014-12-15T12:57:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mauricio\_Scheffer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mauricio_scheffer/32/905_2.png) [@Mauricio\_Scheffer](https://discuss.elastic.co/u/Mauricio_Scheffer)\
**Post date:** [December 15, 2014, 12:57pm UTC](https://discuss.elastic.co/t/custom-scorefunctionparser/21256/1 "2014-12-15T12:57:09Z")

</div>

Hi, I'm looking to write a plugin/module for Elasticsearch that adds a  
custom scoring function. This can't be a simple script score function as it  
does some matrix calculations integrating with other stuff, so it really  
needs to be a plugin.

As far as I can see, the right interface to implement for this is  
ScoreFunctionParser. The question is, all the built-in function parsers  
seem to be registered in FunctionScoreModule, which binds  
a ScoreFunctionParserMapper with a set of ScoreFunctionParser , so can I  
still add in my own ScoreFunctionParser in there through my custom module  
registering a new ScoreFunctionParser?

Would this work? Am I roughly on the right track here?

Thanks,  
Mauricio

--  
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/5603a280-3197-4f16-8816-0266c919700a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5603a280-3197-4f16-8816-0266c919700a%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Mauricio\_Scheffer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mauricio_scheffer/32/905_2.png) [@Mauricio\_Scheffer](https://discuss.elastic.co/u/Mauricio_Scheffer)\
**Post date:** [December 15, 2014, 3:19pm UTC](https://discuss.elastic.co/t/custom-scorefunctionparser/21256/2 "2014-12-15T15:19:48Z")

</div>

Never mind, yes it works.

On Monday, December 15, 2014 12:57:09 PM UTC, Mauricio Scheffer wrote:

> Hi, I'm looking to write a plugin/module for Elasticsearch that adds a  
> custom scoring function. This can't be a simple script score function as it  
> does some matrix calculations integrating with other stuff, so it really  
> needs to be a plugin.
> 
> As far as I can see, the right interface to implement for this is  
> ScoreFunctionParser. The question is, all the built-in function parsers  
> seem to be registered in FunctionScoreModule, which binds  
> a ScoreFunctionParserMapper with a set of ScoreFunctionParser , so can I  
> still add in my own ScoreFunctionParser in there through my custom module  
> registering a new ScoreFunctionParser?
> 
> Would this work? Am I roughly on the right track here?
> 
> Thanks,  
> Mauricio

--  
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/744a458c-d895-4de9-9412-b62f3cad4c48%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/744a458c-d895-4de9-9412-b62f3cad4c48%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, 12:43am UTC](https://discuss.elastic.co/t/custom-scorefunctionparser/21256/3 "2017-07-06T00:43:41Z")

</div>


