Accessing IndexReader in Plugin

Hello,

is it possible to access the IndexReader from the underlying Lucene
Index inside a plugin?
I would like to create an ElasticSearch plugin which accesses a
document directly via the IndexReader.

Code example highly appreciated :wink:

Thanks

Hannes

IndexReader cannot be accessed from a plugin because it's a private member of RobinEngine. You need to add some code in the elasticsearch code:

  1. a function in RobinEngine to do your job
  2. a new action with request, response, transport, ... and add this to the client.

Hi,
Alberto

Inviato da iPhone

Il giorno 16/feb/2012, alle ore 21:50, hannescarl hannescarl@googlemail.com ha scritto:

Hello,

is it possible to access the IndexReader from the underlying Lucene
Index inside a plugin?
I would like to create an Elasticsearch plugin which accesses a
document directly via the IndexReader.

Code example highly appreciated :wink:

Thanks

Hannes

Thanks for that Answer, RobinEngine was exactly I was looking for!

I need to iterate through all documents in an Index, compute
something :wink: and send the response to the client.

Do you think that would work in a distributed scenario?

  • Send request
  • Iterate through documents in each node
  • merge request
  • Send response

Kind Regards

Hannes

On 16 Feb., 23:29, Alberto Paro alberto.p...@gmail.com wrote:

IndexReader cannot be accessed from a plugin because it's a private member of RobinEngine. You need to add some code in the elasticsearch code:

  1. a function in RobinEngine to do your job
  2. a new action with request, response, transport, ... and add this to the client.

Hi,
Alberto

Inviato da iPhone

Il giorno 16/feb/2012, alle ore 21:50, hannescarl hannesc...@googlemail.com ha scritto:

Hello,

is it possible to access the IndexReader from the underlying Lucene
Index inside a plugin?
I would like to create an Elasticsearch plugin which accesses a
document directly via the IndexReader.

Code example highly appreciated :wink:

Thanks

Hannes