You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Ru...@interactivedata.com on 2011/10/10 13:21:51 UTC

Sharding issue, found a number of Docs but SolrDocList is empty

Hi,
 I have a four indexes which I'm sharding together for our general search 
system, each Index has 
it's own solr search webapp in tomcat and they all produce correct results 
individually.

Two of the indexes when sharded together return the correct numFound and a 
loaded 
SolrDocumentList, when I add one of the other two indexes the numFound 
will change to the 
correct value but the SolrDocumentList will be empty. 

I have tried a number of shard configurations and whilst the problem core 
is in the shard list the 
SolrDocumentList will always be empty, even with just the problem index as 
the only one in the 
shard list it still returns a count in the numFound field with an empty 
SolrDocumentList . 

I've tried changing the schema.xml on each index to only three fields and 
removed any unused 
types (see schema.xml below) id,search field and facet field but this made 
no difference. I've also 
shrunk one of the problem indexes down to a single document but the 
problem still occurs. 

One of the indexes that works is generated using the solr 
DataImportHandler whilst another one 
of the working indexes is generated in Lucene.


 I've searched for this issue in solr-user and found two other people with 
the same problem but no resolution.
Multiple shards on same machine find matches but return 0 results. (by 
Aliya Virani)
Shard Query Problem (by Anshul jain) 

Many thanks for your time.

Russell Taylor

SOLR SETUP
Apache Tomcat 6.0.33
solr 3.3.0

<?xml version="1.0" encoding="UTF-8" ?>
<schema name="history" version="1.4">
  <types>
    <!-- A general unstemmed text field that indexes tokens normally and 
also
         reversed (via ReversedWildcardFilterFactory), to enable more 
efficient
   leading wildcard queries. -->
    <fieldType name="text_rev" class="solr.TextField" 
positionIncrementGap="100">
      <analyzer type="index">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true" 
words="stopwords.txt" enablePositionIncrements="true" />
        <filter class="solr.WordDelimiterFilterFactory" 
generateWordParts="1" generateNumberParts="1" catenateWords="1" 
catenateNumbers="1" catenateAll="0" splitOnCaseChange="0"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.ReversedWildcardFilterFactory" 
withOriginal="true"
           maxPosAsterisk="3" maxPosQuestion="2" 
maxFractionAsterisk="0.33"/>
      </analyzer>
      <analyzer type="query">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" 
ignoreCase="true" expand="true"/>
        <filter class="solr.StopFilterFactory"
                ignoreCase="true"
                words="stopwords.txt"
                enablePositionIncrements="true"
                />
        <filter class="solr.WordDelimiterFilterFactory" 
generateWordParts="1" generateNumberParts="1" catenateWords="0" 
catenateNumbers="0" catenateAll="0" splitOnCaseChange="0"/>
        <filter class="solr.LowerCaseFilterFactory"/>
      </analyzer>
    </fieldType>
    <!-- The StrField type is not analyzed, but indexed/stored verbatim. 
-->
    <fieldType name="string" class="solr.StrField" sortMissingLast="true" 
omitNorms="true"/>
    <!-- A Trie based date field for faster date range queries and date 
faceting. -->
    <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" 
precisionStep="6" positionIncrementGap="0"/>
    <!-- lowercases the entire field value, keeping it as a single token. 
-->
    <fieldType name="lowercase" class="solr.TextField" 
positionIncrementGap="100">
      <analyzer>
        <tokenizer class="solr.KeywordTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory" />
      </analyzer>
    </fieldType>
 </types>
 <fields>
   <!-- catchall text field that indexes tokens both normally and in 
reverse for efficient
        leading wildcard queries. -->
   <field name="text_rev" type="text_rev" indexed="true" stored="false" 
multiValued="true"/>
    <field name="id" type="string" indexed="true" stored="true" 
required="true" />
    <field name="idc_search" type="lowercase" indexed="true" stored="true" 
multiValued="true" required="true" />
    <field name="IDC_FEED" type="string" indexed="true" stored="true" 
required="true" />
 </fields>
 <uniqueKey>id</uniqueKey>
 <!-- field for the QueryParser to use when an explicit fieldname is 
absent -->
 <defaultSearchField>idc_search</defaultSearchField>
 <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
 <solrQueryParser defaultOperator="OR"/>
</schema>

*******************************************************
 This message (including any files transmitted with it) may contain
confidential and/or proprietary information, is the property of
Interactive Data Corporation and/or its subsidiaries, and is
directed only to the addressee(s). If you are not the designated
recipient or have reason to believe you received this message in
error, please delete this message from your system and notify the
sender immediately. An unintended recipient's disclosure, copying,
distribution, or use of this message or any attachments is
prohibited and may be unlawful. 
*******************************************************