Reputation: 2543
I have in my database id field of type integer.
I want to index those is Solr 7.
I get "Error CREATEing SolrCore 'mycore': Unable to create core [mycore] Caused by: uniqueKey field (id) can not be configured to use a Points based FieldType: pint
That I get it, though. How can I specify id transformation so that I add document with id being of type integer, but it converts it and index it with type string.
Thank you!
Upvotes: 1
Views: 1029
Reputation: 52892
It should work as you want it to by using the string
type. It'll convert the integer when it has been submitted, and should work as you expect it to.
As noted the only caveat is that the returned type is a string as well, so if you're parsing a format that has serialized the type as well (such as JSON or POJO), the type returned will be a string.
Upvotes: 3