0

SOlr/Carrot2 の統合

以下のようにSolrでドキュメントにインデックスを付けるために作成したXMLごとに複数のテキストファイルがあります

<add>
  <doc>
    <person>data </person>
    <organization>data here </organization>
    <content>Some spanish text here</content >
  </doc>
<add>

インデックス作成で使用されるスキーマ

<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" />

今、私はこのリンク http://carrot2.github.io/solr-integration-strategies/carrot2-3.8.0/index.htmlをたどったため、carrot2 クラスタリングを統合しようとしています。

私の問題は、クラスタークエリの結果として、次のようにクラスターを1つだけ取得しています

<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 個のテキスト ドキュメントが含まれています

4

2 に答える 2

1

Solr で検索結果のクラスタリングを機能させるには、クラスタリングに渡すタイトル フィールドとコンテンツ フィールドを保存する必要があります。Solr スキーマでの宣言は次のようになります。

<field name="content" type="text" indexed="true" stored="true" />
于 2013-12-13T11:13:24.573 に答える
1

保存されているフィールドについて Stanislaw が述べたことに加えて、クラスタリングに使用したクエリと、理想的には、データのインデックス作成に使用した完全なスキーマを提供してください。

インデックスに 60 個のドキュメントしかなく、クエリがドキュメントの小さなサブセットに一致する場合、クラスター化するものは何もありません。

于 2013-12-13T11:17:37.347 に答える