How to directly access ElasticSearch index from a plugin

Hi all,

I want to directly access low level ElasticSearch (or in other words
Lucene) index from a plugin, so that I can say iterate through an inverted
index of a keyword in the plugin. I know from ElasticSearch source code one
can access the ContextIndexSearcher instance (which has an IndexReader
member) from SearchService to directly access the inverted index. However,
I could not figure out how to get the handle to either the
ContextIndexSearcher instance or the SearchService instance from a plugin.
Any suggestion here will be highly appreciated!

Thanks,

-Tao

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1643df27-bb92-429b-acf0-d4cdcf85c545%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I think you can try to inject the SearchService in the plugin?

Have a look at this. We inject here another service. https://github.com/elasticsearch/elasticsearch-mapper-attachments/blob/master/src/main/java/org/elasticsearch/index/mapper/attachment/RegisterAttachmentType.java

HTH

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 11 févr. 2015 à 02:55, Tao Cheng tcheng3@gmail.com a écrit :

Hi all,

I want to directly access low level Elasticsearch (or in other words Lucene) index from a plugin, so that I can say iterate through an inverted index of a keyword in the plugin. I know from Elasticsearch source code one can access the ContextIndexSearcher instance (which has an IndexReader member) from SearchService to directly access the inverted index. However, I could not figure out how to get the handle to either the ContextIndexSearcher instance or the SearchService instance from a plugin. Any suggestion here will be highly appreciated!

Thanks,

-Tao

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1643df27-bb92-429b-acf0-d4cdcf85c545%40googlegroups.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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/AC9F5363-0DAD-423F-8975-FCEF4A04EEFE%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.