Exception in thread "main" org.springframework.data.solr.UncategorizedSolrException: Document is missing mandatory uniqueKey field: id; nested exception is org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Document is missing mandatory uniqueKey field: id
at org.springframework.data.solr.core.SolrTemplate.execute(SolrTemplate.java:145)
at org.springframework.data.solr.core.SolrTemplate.saveBean(SolrTemplate.java:184)
at org.springframework.data.solr.core.SolrTemplate.saveBean(SolrTemplate.java:178)
at com.pinyougou.solrutil.SolrUtil.importItemData(SolrUtil.java:35)
at com.pinyougou.solrutil.SolrUtil.main(SolrUtil.java:43)
Caused by: org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Document is missing mandatory uniqueKey field: id
at org.apache.solr.client.solrj.impl.HttpSolrServer.executeMethod(HttpSolrServer.java:552)
at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:210)
at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:206)
at org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:124)
at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:116)
at org.springframework.data.solr.core.SolrTemplate$4.doInSolr(SolrTemplate.java:187)
at org.springframework.data.solr.core.SolrTemplate$4.doInSolr(SolrTemplate.java:184)
at org.springframework.data.solr.core.SolrTemplate.execute(SolrTemplate.java:141)
... 4 more