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 Vincenzo D'Amore <v....@gmail.com> on 2018/05/07 09:27:51 UTC

solr collection id field type long

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

Re: solr collection id field type long

Posted by Vincenzo D'Amore <v....@gmail.com>.
Thanks :)

On Mon, May 7, 2018 at 4:18 PM, Shawn Heisey <ap...@elyograg.org> 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

Re: solr collection id field type long

Posted by Shawn Heisey <ap...@elyograg.org>.
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