Solr:构面不会创建任何输出
我正在使用Solr 4.4.0并运行一些基本查询。这是我做的,当我插入标题:*在查询框中Solr:构面不会创建任何输出
<?xml version="1.0" encoding="UTF-8"?> <response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">3</int>
<lst name="params">
<str name="q">title:*</str>
<str name="indent">true</str>
<str name="wt">xml</str>
<str name="_">1430883449558</str>
</lst>
</lst>
<result name="response" numFound="70" start="0">
<doc>
<str name="id">db01</str>
<str name="isbn">1933988177</str>
<str name="author">Michael McCandless, Erik Hatcher, Otis Gospodnetic</str>
<str name="author_s">Michael McCandless, Erik Hatcher, Otis Gospodnetic</str>
<int name="numpages">475</int>
<str name="description">When Lucene first hit the scene five years ago, it was nothing short of amazing. By using this open-source, highly scalable, super-fast search engine, developers could integrate search into applications quickly and efficiently. A lot has changed since then-search has grown from a "nice-to-have" feature into an indispensable part of most enterprise applications. Lucene now powers search in diverse companies including Akamai, Netflix, LinkedIn, Technorati, HotJobs, Epiphany, FedEx, Mayo Clinic, MIT, New Scientist Magazine, and many others.</str>
<str name="category">Computers/Programming/Information Retrieval/Lucene</str>
<float name="price">31.49</float>
<str name="price_c">31.49,USD</str>
<arr name="title">
<str>Lucene In Action, 2nd</str>
</arr>
<str name="yearpub">2010</str>
<date name="pubdate">2010-07-28T00:00:01Z</date>
<str name="publisher">Manning Publications</str>
<str name="store">37.763649,-122.24313</str>
<long name="_version_">1500385802538975232</long></doc>
等等等等70倍......
这是正常的,因为这就是我想要的结果( 70本书),但是当我尝试添加facet.field = publisher时,它什么也不做。它返回与上面完全相同的输出。我如何才能让这个方面起作用?索引被设置为true和所有内容。我究竟做错了什么?这里是我的架构的摘录:
<field name="title" type="text_general" indexed="true" stored="true" multiValued="true"/> <field name="subject" type="text_general" indexed="true" stored="true"/>
<field name="description" type="text_general" indexed="true" stored="true"/>
<field name="comments" type="text_general" indexed="true" stored="true"/>
<field name="author" type="text_general" indexed="true" stored="true"/>
<field name="keywords" type="text_general" indexed="true" stored="true"/>
<field name="category" type="text_general" indexed="true" stored="true"/>
<field name="resourcename" type="text_general" indexed="true" stored="true"/>
<field name="url" type="text_general" indexed="true" stored="true"/>
<field name="content_type" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="last_modified" type="date" indexed="true" stored="true"/>
<field name="links" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="yearpub" type="string" indexed="true" stored="true"/>
<field name="pubdate" type="date" indexed="true" stored="true"/>
<field name="publisher" type="text_general" indexed="true" stored="true"/>
<field name="numpages" type="int" indexed="true" stored="true"/>
<field name="isbn" type="text_general" indexed="true" stored="true"/>
回答:
你需要在它使用WhitespaceTokenizerFactory
意味着它分裂短语/字符串分割成块每当遇到空白出版商字段更改text_general
。
<field name="publisher" type="text_general" indexed="true" stored="true"/>
所以剑桥大学出版社分为
- 剑桥
- 大学
- 按
要么删除标记生成器或使用其他fieldType
不使用WhitespaceTokenizerFactory
您可以使用string
字段类型,以便更新后并重新启动Solr的数据和索引数据再次
<field name="publisher" type="string" indexed="true" stored="true"/>
以上是 Solr:构面不会创建任何输出 的全部内容, 来源链接: utcz.com/qa/259719.html