Solr admin shows nothing (nutch)

468 views Asked by At

I've successfully created a Solr index crawling a few pages using nutch. Querying the index using Luke I get the expected results (default field 'content'). However, when I try using the solr/admin interface I get everything using q=: as expected:

<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:

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.

Any help will be much appreciated!

1

There are 1 answers

0
Paige Cook On

Please check the fieldType for your content field in your schema.xml file. If it is set to string then that would explain why you are not getting any query results for specific text values. 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. Please reference Analyzers, Tokenizers, and Token Filters on the Solr Wiki for more information.