You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Erick Erickson <er...@gmail.com> on 2015/10/01 21:50:27 UTC

Re: Re-label terms from a shard?

Actually, I think there is an enum field type, see:
https://issues.apache.org/jira/browse/SOLR-5084.

Although the ability to retrofit the current setup is...er...fraught.

You could always write a custom update processor (maybe a
scriptupdateprocessor?) to
transform synonyms into the "correct" from, but then to find _current_
values you'd have to
do a lot of other work. For faceting you'd have to always return all
values to get correct counts
you have 100 well behaved clients and 1 ill-behaved one. The X facet
counts will probably
be very few relative to x, so combining them would require that both X
and x be returned. With, say,
less than a few hundred distinct values that's certainly possible.

How to make the query work is probably as Upayavira suggests.

Best,
Erick

On Tue, Sep 29, 2015 at 8:47 AM, Upayavira <uv...@odoko.co.uk> wrote:
>
>
> On Tue, Sep 29, 2015, at 03:38 PM, Dan Bolser wrote:
>> Hi,
>>
>> I'm using sharding 'off label' to integrate data from various remote
>> sites
>> running a common schema.
>>
>> One issue is that the remote sites sometimes use synonyms of the allowed
>> terms in a given field. i.e. we specify that a certain field may only
>> carry
>> the values x, y, and z, but the remote indexes decide to use X, Y, and Z
>> instead.
>>
>> In my 'hub' (the server configured to query over all shards), can I
>> configure a mapping such that the facet only shows x, y and z, instead of
>> x, X, y, Y, z, and Z?
>>
>> I'm not sure how a facet selection would 'magically' filter on the list
>> of
>> all synonyms defined in the mapping.
>>
>> I should have defined this field as an enumeration, but I think the cat's
>> out of the bag now!
>
> I'm not sure there's anything you can do here (without a substantial
> programming effort) other than add a layer in front of Solr that adds
> x+X, y+Y and z+Z.
>
> As such, Solr doesn't have an enumeration data type - you'd have to just
> use a string field and enforce it outside of Solr.
>
> Upayavira