lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ezra Epstein" <>
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

1.  The relevant part of the solrconfig.xml:

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

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">
		<float name="score">1.0</float>
		<arr name="cat">
			<str>Featured Titles</str>
		<str name="id">726032414</str>
		<str name="primaryCategory">Drama</str>
		<float name="score">1.0</float>
		<arr name="cat">
			<str>Featured Titles</str>
		<str name="id">726030178</str>
		<str name="primaryCategory">Animation</str>

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"

What am I doing wrong?

View raw message