首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Solr/Carrot2 2集成

Solr/Carrot2 2集成
EN

Stack Overflow用户
提问于 2013-12-13 05:57:10
回答 2查看 362关注 0票数 0

SOlr/Carrot2 2集成

我有多个文本文件,用于在Solr上创建XML到索引文档,如下所示

代码语言:javascript
复制
<add>
  <doc>
    <person>data </person>
    <organization>data here </organization>
    <content>Some spanish text here</content >
  </doc>
<add>

索引中使用的模式

代码语言:javascript
复制
<field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" />    
<field name="person" type="string"  indexed="true" stored="true" required="true" multiValued="true" />
<field name="orgnization" type="string" indexed="true" stored="true" required="true" multiValued="true"   />
<field name="content" type="text_es" indexed="true" stored="true" multiValued="true"/>  
<field name="location" type="string"  indexed="true" stored="true" required="true" multiValued="true" />

现在我正在尝试集成carrot2集群,因为我遵循了这个链接http://carrot2.github.io/solr-integration-strategies/carrot2-3.8.0/index.html

我的问题是,由于集群查询,我只得到了一个如下所示的集群

代码语言:javascript
复制
<arr name="clusters">
  <lst>
<arr name="labels">
  <str>Other Topics</str>
    </arr>
    <double name="score">0.0</double>
    <bool name="other-topics">true</bool>
    <arr name="docs">
      <str>#.txt</str>
      <str>abci-britanicos-pizzerias-201312120250.txt</str>
      <str>abci-arqueologos-israelis-descubren-primer-201312111303.txt</str>
      <str>abci-autoridad-fiscal-pensiones-201312111956.txt</str>
      <str>abci-buenas-razones-para-cambiar-201312110933.txt</str>
      <str>abci-audio-asamblea-aserpinto-201312112139.txt</str>
      <
    </arr>
  </lst>
  </arr>

我应该得到更多的集群我的语料库包含60个文本文档

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2013-12-13 11:13:24

为了使搜索结果群集在Solr中工作,必须存储为群集传递的标题和内容字段。Solr模式中的声明可以如下所示:

代码语言:javascript
复制
<field name="content" type="text" indexed="true" stored="true" />
票数 1
EN

Stack Overflow用户

发布于 2013-12-13 11:17:37

除了Stanislaw关于存储字段的内容外,请提供用于集群的查询,以及理想情况下用于索引数据的完整模式。

如果索引中只有60个文档,并且查询匹配一小部分文档,那么就没有什么可集群的了。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20560016

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档