0

I have indexed 3762587 documents into solr. I double check with my database, and its the same number of lines/documents.

I am making queries on links, so the mm parameter is 100% match. the problem is that some queries does not return results, even tho I can see the record in my database. I cannot understand why some queries works and some not...

this is my schema.xml:

<fields>
           <field name="id" type="string" indexed="true" stored="false" required="true" />
           <field name="title" type="string" indexed="true" stored="true"/>
           <field name="imgUrl" type="string" indexed="true" stored="true"/>
           <field name="_version_" type="long" indexed="true" stored="true" multiValued="false" />
</fields>

I also configured a request handler for the image link search:

<requestHandler name="/image" class="solr.SearchHandler">
     <lst name="defaults">
       <str name="echoParams">explicit</str>
       <str name="wt">json</str>
       <str name="indent">true</str>
       <str name="df">imgUrl</str>
       <str name="defType">edismax</str>
       <str name="qf">imgUrl</str>
       <str name="mm">100%</str>    <!-- Minimum match -->
       <str name="rows">10</str>
       <str name="fl">*,score</str>
     </lst>
  </requestHandler>

A request looks like this:

myserver/solr/collection1/image?q=http://imagesserver.com/images/21533515483100.jpg
Jayendra
  • 52,349
  • 4
  • 80
  • 90
ItayD
  • 533
  • 6
  • 23
  • Maybe I should change the from string to text_ws? because of this: http://stackoverflow.com/questions/3493499/solr-index-appears-to-be-valid-but-returns-no-results but still, why some queries return results and some not? if that was the problem I would expect to receive always 0 hits... – ItayD Mar 12 '13 at 12:05

1 Answers1

0

Yes, my solution works! I changed the type in my schema.xml from string to text_ws and now I always get an answer!

ItayD
  • 533
  • 6
  • 23