代码之家  ›  专栏  ›  技术社区  ›  arthur

solr terms返回零

  •  0
  • arthur  · 技术社区  · 8 年前

    我在跑步 7.2.1 版本,使用 SolrCloud 使用基于示例配置的集合。 lucene 部分配置( http://localhost:8983/solr/admin/info/system?wt=yaml )是的

    solr-spec-version   "7.2.1"
    solr-impl-version   "7.2.1 b2b6438b37073bee1fca40374e85bf91aa457c0b - ubuntu - 2018-01-10 00:54:21"
    lucene-spec-version "7.2.1"
    lucene-impl-version "7.2.1 b2b6438b37073bee1fca40374e85bf91aa457c0b - ubuntu - 2018-01-10 00:48:43"
    

    术语配置( http://localhost:8983/solr/trans/config?wt=yaml )是:

    name    "terms"
    class   "solr.TermsComponent"
    

    这个 http://localhost:8983/solr/trans/terms?wt=xml 返回值:

    <lst name="/terms">
      <str name="startup">lazy</str>
      <str name="name">/terms</str>
      <str name="class">solr.SearchHandler</str>
      <lst name="defaults">
        <bool name="terms">true</bool>
        <bool name="distrib">false</bool>
      </lst><arr name="components"><str>terms</str></arr>
    </lst>
    

    尽管集合中有1K个文档( http://localhost:8983/solr/trans/query?q=*:*&rows=0 ,2MB文本):

    {
      "responseHeader":{
        "zkConnected":true,
        "status":0,
        "QTime":4,
        "params":{
          "q":"*:*",
          "rows":"0"}},
      "response":{"numFound":978,"start":0,"maxScore":1.0,"docs":[]
      }}
    

    我怎样才能看到这些术语(及其频率)?

    1 回复  |  直到 4 年前
        1
  •  1
  •   MatsLindh    8 年前

    如果要使用terms组件获取字段的所有术语,则必须包括 the field you want the terms for :

    http://localhost:8983/solr/trans/terms?terms.fl=fieldname&wt=xml
    
    推荐文章