我正在运行solr 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条答案
按热度按时间hof1towb1#
如果要使用terms组件获取某个字段的所有术语,则必须包含要获取术语的字段: