On 9/18/2020 1:27 AM, Anuj Bhargava wrote:
In managed schema, I have <field name="id" type="string" indexed="true"
stored="true" required="false" multiValued="false" />
Still getting the following error-
org.apache.solr.common.SolrException: Document is missing mandatory
uniqueKey field: id
The problem is that the document that has been fetched with DIH does NOT
have a field named id. Because your schema has named the id field as
uniqueKey, that field is required -- it *must* exist in any document
that is indexed.
Your DIH config suggests that the database has a field named posting_id
... perhaps your Solr schema should use that field as the uniqueKey instead?
Thanks,
Shawn