为了和以前的程序兼容,在solr建立索引的时候,将id设为gid,结果在建立索引时候出现如下错误:

org.apache.solr.common.SolrException: Document [null] missing required field: id

....

原来solr中每个文档都必须有主键,而且默认主键名称为id。

在schema.xml的fields 后有:

<uniqueKey>id</uniqueKey>

相关文章:

  • 2021-09-28
  • 2022-01-17
  • 2022-12-23
  • 2021-10-25
  • 2021-11-02
  • 2021-09-13
  • 2021-08-29
  • 2021-08-05
猜你喜欢
  • 2022-12-23
  • 2021-06-07
  • 2022-12-23
  • 2021-10-16
  • 2021-07-21
  • 2021-09-11
  • 2021-06-14
相关资源
相似解决方案