Custom Facet type as plugin


(Igor Semenko) #1

Is there way to deliver custom facet type without patching ES? I developed
a new facet type needed for my project, but I have to patch FacetModule's
constructor (add to processors) to get it working.

It would be nice to declaratively add new facets thru configuration or
plugin infrastructure. Any plans on that?

Thanks


(Eric Jain) #2

On Apr 18, 1:48 am, Igor Semenko i...@semenko.com wrote:

It would be nice to declaratively add new facets thru configuration or
plugin infrastructure. Any plans on that?

+1


(Igor Motov) #3

Igor,

You can add your facet using plugin infrastructure. If you are using 0.19
or later, all you have to do is add the following method to your Plugin
class:

public void onModule(FacetModule facetModule) {
    facetModule.addFacetProcessor(MyFacetsProcessor.class);
}

Before 0.19 you can do the same thing using processModule method.

Igor

On Wednesday, April 18, 2012 12:31:31 PM UTC-4, Eric Jain wrote:

On Apr 18, 1:48 am, Igor Semenko i...@semenko.com wrote:

It would be nice to declaratively add new facets thru configuration or
plugin infrastructure. Any plans on that?

+1


(system) #4