lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Toke Eskildsen>
Subject Re: Optimize facets when actually single valued?
Date Wed, 14 Nov 2012 07:41:08 GMT
On Tue, 2012-11-13 at 19:50 +0100, Yonik Seeley wrote:
> The original version of Solr (SOLAR when it was still inside CNET) did
> this - a multiValued field with a single value was output as a singe
> value, not an array containing a single value.  Some people wanted
> more predictability (always an array or never an array).

So there are two very different issues with this optimization:

Under the hood, it looks like a win. The single value field cache is
better performing (speed as well as memory) than the uninverted field.
There's some trickery with index updates as re-use of structures gets
interesting when all segments has been delivering single value and a
multi-value segment is introduced.

Dynamically changing response formats sounds horrible. The premise for
this optimization it laziness (or lack of oversight) from some users. If
the searcher normally returns one format, those users will design their
frontend from an expectation that it will _always_ return that format.

Always returning arrays, even when the underlying system has dynamically
selected single value mode and only a single value is returned, forces
the frontend programmers to consider both cases.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message