Yonik Seeley <ysee...@gmail.com> wrote:
> Hmmm, well something is really wrong for this orders of magnitude
> difference.  I've never seen anything like that and we should
> definitely try to get to the bottom of it.

This might be a wild goose chase, but...

Zheng states it is a text field with the content of fairly large documents. 
This means a high amount of unique values and a gazillion references from 
documents to those values.

When incrementing counters for String faceting, segment ordinal -> index 
ordinal mapping takes place. Legacy facets has a mechanism where temporary 
segment-specific counters are used. These are updated directly with the segment 
ordinals and the mapping to global ordinals is performed after the counting.

As far as I can see, JSON Facets does not have this delayed mapping mechanism: 
Every increment requires a call to the segment->global-ordinal map. With a 
large field this map cannot be in the fast caches. Combine this with a 
gazillion references and it makes sense that JSON Facets is slower in this 
scenario. A factor 20 sounds like way too much though. I would have expected 
maybe 2.

- Toke Eskildsen

Reply via email to