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 via email to