当我尝试使用Solr为ASPX文件编制索引时,我总是收到错误消息。我的ASPX文件非常标准。有人知道Solr是否无法索引ASPX文件吗?如果将扩展名从ASPX更改为HTML,Solr可以很好地索引文件,我觉得很奇怪。
我使用的命令是(对于Windows用户):
java -Dc=collection -Drecursive -Dfiletypes=aspx jar example/exampledocs/post.jar c:/folder
我得到了错误:
SimplePostTool: WARNING: Solr returned an error #400 (Bad Request) for url: http://localhost:8983/solr/collection/update
SimplePostTool: WARNING: Response: <?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader">
<int name="status">400</int>
<int name="QTime">1</int>
</lst>
<lst name="error">
<lst name="metadata">
<str name="error-class">org.apache.solr.common.SolrException</str>
<str name="root-error-class">com.ctc.wstx.exc.WstxUnexpectedCharException</str>
</lst>
<str name="msg">Unexpected character '=' (code 61); expected a semi-colon after the reference for entity 'l'
at [row,col {unknown-source}]: [8,43]</str>
<int name="code">400</int>
</lst>
</response>
在Solr日志中:
org.apache.solr.common.SolrException: Unexpected character '=' (code 61); expected a semi-colon after the reference for entity 'l'