Solr 7.5限制方面某些术语无法按计数排序?


蜡笔小辛
2025-03-12 09:12:25 (12天前)
  1. 我想在Solr表作者上面对location.authorIds字段,但也限制了某些术语的方面。

我这样做了,就像在Solr 7.5教程中一样,http://lucene.apache.org/solr/guide / …

2 条回复
  1. 0# NetworkAttachedStorage | 2019-08-31 10-32



    在我对代码进行测试和调试之后,我可以清楚地看到,这是代码中的一个错误。




    1. org.apache.solr.request.SimpleFacets#getListedTermCounts

    2. for (String term : terms) {
      int count = searcher.numDocs(ft.getFieldQuery(null, sf, term), parsed.docs);
      res.add(term, count);
      }

    3. </code>


    这显然是错误的,因为它只是遍历列表并按照您在查询参数中指定的顺序提供计数。



    我创建了一个Solr问题 -

    https://issues.apache.org/jira/browse/SOLR-13156

    1. - 并提供补丁。它是
    2. <a href="https://github.com/apache/lucene-solr/commit/43f2723213ed403a9f58d813d391ef26c961d909" rel="nofollow noreferrer">
    3. 提交
    4. </A>
    5. 并很快将在Solr上市


登录 后才能参与评论