使用 Apache Solr 建立索引期间出错:非多值字段关键字遇到多个值

ned*_*ned 2 lucene solr

我正在尝试使用 Apache Lucene Solr 快速索引大量 html 文件,以进行一次信息检索实验。我正在使用随最新版本 ( ) 分发的示例 Solr 实例,solr-4.9.0/example/solr本着快速而肮脏的解决方案的精神,我只是使用curl 提交文档:

\n\n
curl http://localhost:8983/solr/update/extract?literal.id=001 -F myfile=@blah.html\n
Run Code Online (Sandbox Code Playgroud)\n\n

当我在索引期间查看 Solr 面板中的日志时,我看到许多以下形式的错误:

\n\n
org.apache.solr.common.SolrException: ERROR: [doc=BLOG06-20060103-014-0011844415] multiple values encountered for non multiValued field keywords: [hair care,\xe2\x80\x8b shampoo,\xe2\x80\x8b hair styles,\xe2\x80\x8b hair styles,\xe2\x80\x8b ...]\n
Run Code Online (Sandbox Code Playgroud)\n\n

看起来执行关键字提取的组件正在提取多个值,而它可能应该只是由空格分隔的单词列表。我需要做些什么来强制执行此操作,还是这看起来像是某种错误?

\n

ned*_*ned 5

事实证明,解决方案就像确保已schema.xml指定关键字字段一样简单multiValued="true"。然后我不得不在其他几个领域这样做。我愚蠢地假设架构将被设置为与演示实例中的默认文档解析器相匹配。