Access Indexreader object in search context of an elastic search plugin


(Hardik Dobariya) #1

I am new to elastic search plugins and finding difficult on how to access Indexreader object in a plugin while performing the searching request of an index. I want something like this.
A user performs the search request

Post my_index/Plugin-Test/_search

On executing the above, Plugin-Test should be called with access of the Indexreader object.

Please provide me sample code for the same


(Alexander Reelsen) #2

You may want to take a look at the SearchPlugin interface in Elasticsearch, that you plugin might want to implement.

Note, that you cannot overwrite the above endpoint, you can only extend the query functionality.

If you want to take a look at some example plugins, take a look at https://github.com/elastic/elasticsearch/tree/6.3/plugins/examples


(system) #3

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