我使用resteasy将内容发送到本地运行的solr实例。
在其余的客户端,我会:
URL: http://IPAddress:8983/solr/update?commitWithin=500
Headers: Content-Type: application正文:
[
{
"id" : "12345678",
"fileName" : "scr.sh",
"content" : "cd /opt/solr; echo hi"
}
]我得到了一个200 for,它很好,我可以通过查询在Solr Admin中查询它。
在运行solr的终端窗口中,我看到
5022136 [qtp1614114480-18] INFO org.apache.solr.update.processor.LogUpdateProcessor – [collection1] webapp=/solr path=/update params={commitWithin=500} {add=[12345678459 (1489768701904289792)]} 0 2
5022637 [commitScheduler-9-thread-1] INFO org.apache.solr.update.UpdateHandler – start commit{,optimize=false,openSearcher=true,waitSearcher=true,expungeDeletes=false,softCommit=true,prepareCommit=false}
5022649 [commitScheduler-9-thread-1] INFO org.apache.solr.search.SolrIndexSearcher – Opening Searcher@462cd2d6[collection1] main
5022650 [commitScheduler-9-thread-1] INFO org.apache.solr.update.UpdateHandler – end_commit_flush
5022651 [searcherExecutor-6-thread-1] INFO org.apache.solr.core.SolrCore – QuerySenderListener sending requests to Searcher@462cd2d6[collection1] main{StandardDirectoryReader(segments_1:9:nrt _0(4.10.3):C2/1:delGen=1 _1(4.10.3):C1 _2(4.10.3):C1 _3(4.10.3):C1)}
5022651 [searcherExecutor-6-thread-1] INFO org.apache.solr.core.SolrCore – QuerySenderListener done.但是,当我通过xml执行此操作时:
<step>
<id>123456789112</id>
<fileName>deploy345.sh</fileName>
<content>cd /opt/el; echo $[/myServer/SidsProperty]</content>
</step>我得到200英镑。但航站楼显示:
5014515 [qtp1614114480-18] INFO org.apache.solr.update.processor.LogUpdateProcessor – [collection1] webapp=/solr path=/update params={commitWithin=500} {} 0 0但是没有提交,我在Solr Admin中也没有看到。我正在处理一些只释放XML的东西,并试图将其推入solr中。有什么东西我需要包起来才能让它提交吗?
发布于 2015-01-08 22:54:02
根据文档,xml应该具有以下格式:
<add>
<doc>
<field name="id">123456789112</field>
<field name="filename">deploy345.sh</field>
<field name="content">cd /opt/el; echo $[/myServer/SidsProperty]</field>
</doc>
</add>https://stackoverflow.com/questions/27850832
复制相似问题