Question about facet classes

Hey there,

while taking a look at the existing additional facet implementations
floating around, some questions raised to me:

  1. Is a FacetProcessor instantiated per shard? As FacetProcessor.parse()
    uses a SearchContext as parameter, I cant think of another case.
  2. If the above statement is true, then is there any last sort of reduce
    step for the per-shard results? If so, where does it happen? I havent found
    it in a quick peek...

If none of the above is true I am open for explanations what happens and
how :slight_smile:

Thanks and have a nice weekend!

--Alexander

--

Hi Alexander,

You are correct, FacetProcessors are created per shard to generate an initial facet for the data on the shard. Tose facets are sent to the originating node ( the one that got the request from the client) where they are combined. This is also the responsibility of the FacetProcessor.

Here is a slide deck of a talk I gave which may help explaining: http://www.slideshare.net/bleskes/elastic-search-meetup-2092012

Cheers,
Boaz

On Saturday, December 8, 2012 11:11:28 PM UTC+1, Alexander Reelsen wrote:

Hey there,

while taking a look at the existing additional facet implementations floating around, some questions raised to me:

  1. Is a FacetProcessor instantiated per shard? As FacetProcessor.parse() uses a SearchContext as parameter, I cant think of another case.

  2. If the above statement is true, then is there any last sort of reduce step for the per-shard results? If so, where does it happen? I havent found it in a quick peek...

If none of the above is true I am open for explanations what happens and how :slight_smile:

Thanks and have a nice weekend!

--Alexander

--

Hey Boaz,

I used your presentation as a reference already (thx for that one!)
Just hadnt seen, that the FacetProcessor from the querying node is also
responsible for calling reduce().. Will check the source for that.

Thanks for the clarification and have a nice weekend!

--Alexander

On Sun, Dec 9, 2012 at 8:47 AM, Boaz Leskes b.leskes@gmail.com wrote:

Hi Alexander,

You are correct, FacetProcessors are created per shard to generate an
initial facet for the data on the shard. Tose facets are sent to the
originating node ( the one that got the request from the client) where they
are combined. This is also the responsibility of the FacetProcessor.

Here is a slide deck of a talk I gave which may help explaining:
http://www.slideshare.net/bleskes/elastic-search-meetup-2092012

Cheers,
Boaz

On Saturday, December 8, 2012 11:11:28 PM UTC+1, Alexander Reelsen wrote:

Hey there,

while taking a look at the existing additional facet implementations
floating around, some questions raised to me:

  1. Is a FacetProcessor instantiated per shard? As FacetProcessor.parse()
    uses a SearchContext as parameter, I cant think of another case.

  2. If the above statement is true, then is there any last sort of reduce
    step for the per-shard results? If so, where does it happen? I havent found
    it in a quick peek...

If none of the above is true I am open for explanations what happens and
how :slight_smile:

Thanks and have a nice weekend!

--Alexander

--

--