简体   繁体   English

Solr管理员什么都不显示(nutch)

[英]Solr admin shows nothing (nutch)

I've successfully created a Solr index crawling a few pages using nutch. 我已经成功创建了Solt索引,并使用了nutch爬行了几页。 Querying the index using Luke I get the expected results (default field 'content'). 使用Luke查询索引,我得到了预期的结果(默认字段“ content”)。 However, when I try using the solr/admin interface I get everything using q= : as expected: 然而,当我尝试使用的Solr /后台管理界面,我得到运用Q一切=:预期:

<response>
<lst name="responseHeader">
  <int name="status">0</int>
  <int name="QTime">0</int>
  <lst name="params">
    <str name="indent">on</str>
    <str name="start">0</str>
    <str name="q">*:*</str>
    <str name="version">2.2</str>
    <str name="rows">10</str>
  </lst>
</lst>
<result name="response" numFound="11" start="0">
  <doc>
    <float name="boost">1.0</float>
    <str name="content">
      'a lot of text...'
    </str>
    <str name="digest">f73dc90d5ab992f62ba3980de2312dfe</str>
    <str name="id">http://thenet.net/</str>
    <str name="segment">20120529084510</str>
    <str name="title">1 < 2 < 3</str>
    <date name="tstamp">2012-05-29T06:45:12.872Z</date>
    <str name="url">http://theurl.net</str>
  </doc>

but absolutely nothing when querying for specific strings: 但查询特定字符串时绝对没有:

<response>
  <lst name="responseHeader">
    <int name="status">0</int>
    <int name="QTime">0</int>
    <lst name="params">
      <str name="indent">on</str>
      <str name="start">0</str>
      <str name="q">java</str>
      <str name="version">2.2</str>
      <str name="rows">10</str>
    </lst>
  </lst>
  <result name="response" numFound="0" start="0"/>
</response>

At the Solr admin interface it says: 在Solr管理员界面上,它说:

mro:8983
cwd=/$PATH_TO_SOLR_AND_NUTH_DIRS/solr/example SolrHome=solr/./ 
HTTP caching is OFF

In schema.xml 'content' is default search field. 在schema.xml中,“内容”是默认搜索字段。

Any help will be much appreciated! 任何帮助都感激不尽!

Please check the fieldType for your content field in your schema.xml file. 请在schema.xml文件中检查内容字段的fieldType。 If it is set to string then that would explain why you are not getting any query results for specific text values. 如果将其设置为string那么这将解释为什么您没有获得针对特定文本值的任何查询结果。 You should use a fieldType of text_general or something similar to get better search results as that fieldType will tokenize, filter and stem the values that are indexed. 您应该使用text_general的text_general或类似的名称以获得更好的搜索结果,因为fieldType将标记化,过滤并阻止索引的值。 Please reference Analyzers, Tokenizers, and Token Filters on the Solr Wiki for more information. 请参考Solr Wiki上的分析器,令牌生成器和令牌过滤器以获取更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM