Extension Point for Custom Lucene Collectors?

Hi,

I would like to use a custom org.apache.lucene.search.TopFieldCollector in
my searches. Does ES have an extension point where I can do this?

  • David.

I also got this problem. I've already have an implemented custom collector
for lucene, but i don't know how to use in Elasticsearch...

On Tuesday, July 24, 2012 2:54:41 PM UTC+3, davrob2 wrote:

Hi,

I would like to use a custom org.apache.lucene.search.TopFieldCollector in
my searches. Does ES have an extension point where I can do this?

  • David.

You can register the custom collector as a plugin. However, the
collector is simply not plug-n-play, it needs to conform with the
distributed nature of Elasticsearch and implement the appropriate
classes.

Here is a previous discussion:
http://elasticsearch-users.115913.n3.nabble.com/Creating-new-facet-types-td3745543.html

--
Ivan

On Mon, Jul 30, 2012 at 1:22 AM, Ferhat Celik ceferhat@gmail.com wrote:

I also got this problem. I've already have an implemented custom collector
for lucene, but i don't know how to use in Elasticsearch...

On Tuesday, July 24, 2012 2:54:41 PM UTC+3, davrob2 wrote:

Hi,

I would like to use a custom org.apache.lucene.search.TopFieldCollector in
my searches. Does ES have an extension point where I can do this?

  • David.

Hi Ivan,

Thanks for the advice. I want to create a custom sort plugin that will
allow custom sorting by comparator, rather than by score, which will
require some map-reduce style work to gather the sort results from each
shard and then combine the results into a final sort order.

This is quite worrying stuff, as there is a lot that could go wrong, any
clues and pointers you can give would be valuable.

So far, this custom facet seems like the best example I could use, as
facets also have to use map-reduce to collect their data:

https://github.com/jprante/elasticsearch-index-termlist/blob/master/src/main/java/org/elasticsearch/action/termlist/TransportTermlistAction.java

Any other links would be welcome.

  • David.

On Monday, July 30, 2012 5:26:15 PM UTC+1, Ivan Brusic wrote:

You can register the custom collector as a plugin. However, the
collector is simply not plug-n-play, it needs to conform with the
distributed nature of Elasticsearch and implement the appropriate
classes.

Here is a previous discussion:

http://elasticsearch-users.115913.n3.nabble.com/Creating-new-facet-types-td3745543.html

--
Ivan

On Mon, Jul 30, 2012 at 1:22 AM, Ferhat Celik ceferhat@gmail.com wrote:

I also got this problem. I've already have an implemented custom
collector
for lucene, but i don't know how to use in Elasticsearch...

On Tuesday, July 24, 2012 2:54:41 PM UTC+3, davrob2 wrote:

Hi,

I would like to use a custom org.apache.lucene.search.TopFieldCollector
in
my searches. Does ES have an extension point where I can do this?

  • David.