【问题标题】:Solr3.2 Carrot2 Clustering nothing but "Other Topics"Solr3.2 Carrot2 只聚类“其他主题”
【发布时间】:2011-09-24 06:15:52
【问题描述】:

据说自 Solr 3.2 发布以来,Carrot 与 Solr 的集成得到了改进,但对我来说却是不同的。我运行了一个配置完全相同的 Solr 1.4.1 服务器,Carrot 运行良好,而 Solr 3.2 只给了我“其他主题”。这让我发疯,因为除此之外我没有任何异常或任何异常。甚至结果 xml 看起来都一样...

不过集群组件的标准配置我没有做太多改动:

 <searchComponent name="clustering" 
                   enable="${solr.clustering.enabled:true}"
                   class="solr.clustering.ClusteringComponent" >
    <lst name="engine">
      <str name="name">default</str>

      <str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>

      <str name="LingoClusteringAlgorithm.desiredClusterCountBase">20</str>
          <!--custom-->
      <str name="LingoClusteringAlgorithm.phraseLabelBoost">8.00</str>
      <str name="TermDocumentMatrixBuilder.titleWordsBoost">6.00</str>


      <str name="carrot.lexicalResourcesDir">clustering/carrot2</str>

      <str name="MultilingualClustering.defaultLanguage">ENGLISH</str>
    </lst>
    <lst name="engine">
      <str name="name">stc</str>
      <str name="carrot.algorithm">org.carrot2.clustering.stc.STCClusteringAlgorithm</str>
    </lst>
  </searchComponent>
  <requestHandler name="/clustering"
                  startup="lazy"
                  enable="${solr.clustering.enabled:true}"
                  class="solr.SearchHandler">
    <lst name="defaults">
      <bool name="clustering">true</bool>
      <str name="clustering.engine">default</str>
      <bool name="clustering.results">true</bool>
       <str name="carrot.title">autocomplete</str>
       <str name="carrot.url">autocomplete</str>
       <str name="carrot.snippet">autocomplete</str>
       <bool name="carrot.outputSubClusters">true</bool>

       <str name="defType">edismax</str>
       <str name="qf">
          text^0.5 autocomplete^1.2 ata^1.0 raum^1.0 system^1.0 assy^1.0 unit^1.0
       </str>
       <str name="q.alt">*:*</str>
       <str name="rows">10</str>
       <str name="fl">*,score</str>
    </lst>     
    <arr name="last-components">
      <str>clustering</str>
    </arr>
  </requestHandler>

我最好的猜测是,carrot 不能与 edismax(在 Solr 1.4.1 中未实现)一起正常工作,但这可能会产生误导。

我已经重新索引了我的数据,只是为了确保这不是问题所在。

在胡萝卜工作台中,使用 Lingo 作为算法时,聚类效果很好。当我选择“按来源”时,我得到了 xml 中的“其他主题”。 Lingo可能没有配置好?除了 solrconfig.xml 之外,是否必须配置任何东西来解决这个问题?

感谢您的帮助。

【问题讨论】:

    标签: search solr cluster-analysis edismax carrot2


    【解决方案1】:

    如果您尝试集群的“sn-p”从未不同或差异很小,则会发生这种情况。尝试将“clustering.sn-p=”添加到您的请求参数中。在您的设置中,有一个默认为“自动完成”的字段。该字段是否有任何有意义的文字?

    使这种行为消失的示例:

    http://localhost:8983/solr/clustering?q=peter&rows=200&carrot.snippet=summary

    最好的问候,

    /彼得·W

    【讨论】:

    • 谢谢你,问题真的是我的“自动完成”属性,它是一个令牌。我现在使用不同的,一切都很好。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-30
    • 1970-01-01
    • 2019-07-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多