I mean, you can add a MyOwnFunctionBuilder/MyOwnFunctionParser to Elasticsearch via plugin. See package org.elasticsearch.index.query.functionscore for the standard implementations.
The functionscore code is masterpiece quality - no need to modify existing code! It is pluggable. A close example to what you want to achieve is org.elasticsearch.index.query.functionscore.fieldvaluefactor This would be an alternative to the AbstractSearchScript call implementation path you have chosen so far Jörg On Fri, Jun 6, 2014 at 6:33 PM, virgil <virgil...@gmail.com> wrote: > Good idea! One thing I am not quite clear is that writing a custom > ScoreFunction, I will have to modify elasticsearch source code and compile > it right? Or there is any other way to do it? Thank you. > > > > -- > View this message in context: > http://elasticsearch-users.115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057232.html > Sent from the ElasticSearch Users mailing list archive at Nabble.com. > > -- > 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+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/1402072380650-4057232.post%40n3.nabble.com > . > For more options, visit https://groups.google.com/d/optout. > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHRK2rUjGKTCxyLQNkKY4Fcc6Dxo0Hz-YkswXZ3SvNELw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.