Installing an example plugin in elasticsearch


I am new to elasticsearch, and I want to develop an elasticsearch plugin for rescoring. I was looking through the web and found an example plugin in elasticsearch repository, Expert Scoring Script ( But I am not sure how to install this plugin and use it in the search.
Any help/suggestions would be greatly appreciated.



you can clone the elasticsearch repository, change to the correct branch or tag of the version you want to build against, and then run

cd plugins/examples/script-expert-scoring
../../../gradlew assemble

This will leave you with a zip file that you can install via elasticsearch-plugin. If you write your own plugin, you separate this from elasticsearch however. This is an external example plugin


Hi Alex,

This worked fine for building and installing the plugin. Thanks for the help.
But the "script-expert-scoring" plugin doesn't seem to work as expected. I am getting the result for postings as null:
PostingsEnum postings = context.reader().postings(new Term(field, term));

while debugging this issue, I checked the value for context.reader(), it looked fine.
also checked the value of new Term(field,term) and this is also fine.
But the postings(new Term(field,term) is null.

Please can you suggest how to get this to work?


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.