solr

java.lang.RuntimeException: 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
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)

使用solrTemplate  的saveBean方法,会报如上错误。

posted @ 2019-02-28 14:32  payn  阅读(134)  评论(0)    收藏  举报