solr collection id field type long

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

solr collection id field type long

Vincenzo D'Amore
Hi all,

I'm moving an old collection from Solr 4.8.1 to 7.3.0 where the "id" field
has type solr.TrieLongField.

Given that solr.TrieLongField has been deprecated I've changed to with the
newer LongPointField.

But when I tried to create the collection Solr returned the following
exception:

org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
Could not load conf for core collection1_shard1_replica_n1: Can't load
schema schema.xml: uniqueKey field (id) can not be configured to use a
Points based FieldType: plong

I've not found an alternative, so I've temporarily switched to "string".

Looking around I've found in the source code:

        if (uniqueKeyField.getType().isPointField()) {
          String msg = UNIQUE_KEY + " field ("+uniqueKeyFieldName+
            ") can not be configured to use a Points based FieldType: " +
uniqueKeyField.getType().getTypeName();
          log.error(msg);
          throw new SolrException(ErrorCode.SERVER_ERROR, msg);
        }

Which explain clearly that I cannot do this :D ...

So just to understand, why we have this behaviour? Is there anything, a
mail thread or a ticket I could read?

Thanks for your time,
Vincenzo


--
Vincenzo D'Amore
Reply | Threaded
Open this post in threaded view
|

Re: solr collection id field type long

Shawn Heisey-2
On 5/7/2018 3:27 AM, Vincenzo D'Amore wrote:
> So just to understand, why we have this behaviour? Is there anything, a
> mail thread or a ticket I could read?

https://issues.apache.org/jira/browse/SOLR-10829?attachmentOrder=desc

Thanks,
Shawn

Reply | Threaded
Open this post in threaded view
|

Re: solr collection id field type long

Vincenzo D'Amore
Thanks :)

On Mon, May 7, 2018 at 4:18 PM, Shawn Heisey <[hidden email]> wrote:

> On 5/7/2018 3:27 AM, Vincenzo D'Amore wrote:
>
>> So just to understand, why we have this behaviour? Is there anything, a
>> mail thread or a ticket I could read?
>>
>
> https://issues.apache.org/jira/browse/SOLR-10829?attachmentOrder=desc
>
> Thanks,
> Shawn
>
>


--
Vincenzo D'Amore