Solr 5.1.0: How to set the unique key via Schema API

1.6k views Asked by At

In Solr 5.1.0, is it possible to set the unique key via the REST schema api?
I created a collection with the data driven schema.
Solr would guess what the field type and create the field based on the data I upload.
I can still define fields beforehand by sending a POST request like
curl -X POST -H 'Content-type:application/json' --data-binary
'{ "add-field":{"name":"ID","type":"strings","stored":true }}' host:port/solr/test/schema

But I wonder if there is a way to define it as the unique key.
Tried to add "uniqueKey":true but it failed

1

There are 1 answers

0
jay On BEST ANSWER

No its not possible as of now. Its an open feature request. https://issues.apache.org/jira/browse/SOLR-7242