Hi,

I am using rev 1036236 of solr trunk running as a servlet in Tomcat 7.
The doc set is sharded over 11 shards.
Currently, I have all the shards running in a single tomcat.

Please see the bottom of the email for the bits of my schema.xml and 
solrconfig.xml that might help you understand my configuration.

I am seeing what I think is strange behavior when I try to use the geofilt in a 
filter query.
Here's what I am seeing:


1.       If put the {!geofilt} as the last argument of the fq= parameter and I 
send the following distributed query to my sharded index:
/select?&start=0&rows=30&q=food&fq=b_type:shops AND 
{!geofilt}&qt=spatialdismax&fl=*%2Cscore&facet=false&pt=38.029191,-78.479266&sfield=lat_long&d=80&shards=...
I get a syntax error. Which seems odd to me.


2.       If I move the {!geofilt} to the first position in the fq= and send the 
following distributed query:
/select?&start=0&rows=30&q=food&fq={!geofilt} AND 
b_type:T01&qt=spatialdismax&fl=*%2Cscore&facet=false&pt=38.029191,-78.479266&sfield=lat_long&d=80&shards=...
Then only the geofilt is apply, not the b_type:T01. Which seems odd to me. I 
would expect both filters to be applied.


3.       Finally, when I submit this query as:
/select?&start=0&rows=30&q=food&fq=_query_:"{!geofilt} AND 
b_type:T01&qt=spatialdismax&fl=*%2Cscore&facet=false&pt=38.029191,-78.479266&sfield=lat_long&d=80&shards=...
This works as I had hoped, i.e. both the geofilt and the b_type filters are 
applied.

Am I trying to use geofilt in the wrong way or is this possibly a bug?

Thanks,
Jerry Mindek


<!--schema.xml-->
<field name="cn" type="text" indexed="true" stored="true" required="true" />
<field name="dn" type="string" indexed="true" stored="true" required="false" />
<field name="t1" type="text" indexed="true" stored="true" />
<field name="ts" type="string" indexed="true"  stored="true"/>
<field name="lb" type="text" indexed="true"   stored="false" />
<field name="sim" type="string" indexed="true"   stored="true" />
<field name="s4_s" type="text" indexed="true"   stored="false" />
<field name="stat" type="string" indexed="true" stored="true"  />
<field name="pst" type="text" indexed="true"  stored="true" />
<fieldType name="location" class="solr.LatLonType" 
subFieldSuffix="_coordinate"/>
...
<field name="type" b_type="string" indexed="true" stored="true"/>
<field name="lat_long" type="location" indexed="true" stored="true" />
<!-end snippet schema.xml-->

<!-solrconfig.xml -->
<requestHandler name="spatialdismax" class="solr.DisMaxRequestHandler" >
    <lst name="defaults">
     <str name="sort">score desc</str>
     <str name="facet">true</str>
     <str name="facet.mincount">1</str>
     <str name="echoParams">explicit</str>
     <int name="rows">20</int>
     <float name="tie">0.01</float>
     <str name="qf">
        cn^2.0 t1^2.0 ts^2.0 lb^2.0 s4_s^2.0 sim^2.0
     </str>
     <str name="pf">
        cn^2.0 t1^2.0 ts^2.0 lb^2.0 s4_s^2.0 sim^2.0
     </str>
       <str name="fl">dn, cn,  t1, stat, pst, pct, ts, sv, score</str>
     <str name="mm">
        2&lt;-1 5&lt;-2 6&lt;90%
     </str>
     <int name="ps">100</int>
     <str name="q.alt">*:*</str>
    </lst>
  </requestHandler>
<!-end snippet solrconfig.xml-->

Reply via email to