lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ezra Epstein" <c-Ezra.Epst...@theplatform.com>
Subject Bizarre DisMax behavior: "q" parameter not working but "q.alt" is, and multi-valued fields not matching at all
Date Thu, 01 May 2008 19:50:00 GMT
Config:

1.  The relevant part of the solrconfig.xml:

  <requestHandler name="/genre" class="solr.StandardRequestHandler"
defType="dismax">
    <lst name="defaults">
     <str name="echoParams">explicit</str>
     <float name="tie">0.01</float>
     <str name="qf">
        primaryCategory^2 cat^0.5
     </str>
     <str name="pf">
        primaryCategory^2 cat^0.5
     </str>
     <str name="fl">
     	id,contentID
     </str>
     <int name="ps">100</int>
     <str name="q.alt">*:*</str>
    </lst>
  </requestHandler>

2.  The relevant part of the schema.xml 

   <field name="primaryCategory" type="string" indexed="true"
stored="true" required="true" />
   <field name="cat" type="string" indexed="true" stored="true"
required="false" multiValued="true"/>

3.  Some queries with curious results:

a.  http://test02:8080/sfx/genre?fl=score
Fine - all items returned, as expected.  E.g.,:

<result name="response" numFound="2" start="0" maxScore="1.0">
	<doc>
		<float name="score">1.0</float>
		<arr name="cat">
			<str>Drama</str>
			<str>Featured Titles</str>
		</arr>
		<str name="id">726032414</str>
		<str name="primaryCategory">Drama</str>
		...
	</doc>
	<doc>
		<float name="score">1.0</float>
		<arr name="cat">
			<str>Animation</str>
			<str>Featured Titles</str>
		</arr>
		<str name="id">726030178</str>
		<str name="primaryCategory">Animation</str>
		...
	</doc>
</result>

b. http://test02:8080/sfx/genre?fl=score&q=drama
Works: Returns the single, expected result.  
"Drama" shows up in both a single-valued field (primaryCategory) and a
multi-valued field (cat), both of which are listed in the /genre
response handler's "qf" parameter.

c. http://test02:8080/sfx/genre?fl=score&q=Featured%20Titles
No results. "Featured Titles" appears only in the multi-valued "cat"
field.  

What am I doing wrong?



Mime
View raw message