Ok..I removed all my custom components from findperson request handler..

  <requestHandler name="findperson" class="solr.SearchHandler"
default="false">
    <lst name="defaults">
      <str name="defType">lucene</str>
      <str name="echoParams">explicit</str>
      <int name="rows">10</int>
      <str name="q.op">AND</str>
      <str name="qf">person_name_all_i</str>
      <int name="score_truncation_cliff">50</int>
      <int name="fps_dist">32</int>
      <str name="q">
          *:*
      </str>
          <lst name="appends">
            <str name="fq">{!switch case='*:*' default=$fq_bbox
v=$fps_latlong}</str>
        </lst>
        <lst name="invariants">
            <str name="fq_bbox">_query_:"{!bbox pt=$fps_latlong sfield=geo
d=$fps_dist}"</str>
        </lst>
    </lst>
    <arr name="components">
        <str>query</str>
      <str>debug</str>
    </arr>
  </requestHandler>


My query:
select?fl=*,score&rows=10&qt=findperson&fps_latlong=42.3482,-75.1890

The above query just returns everything back from SOLR (should only return
results corresponding to lat and long values passed in the query)...

I even tried changing the below hack, but got the same results.

        <str name="fq_bbox">{!bbox pt=$fps_latlong sfield=geo
d=$fps_dist}</str>

Not sure if I am missing something...




--
View this message in context: 
http://lucene.472066.n3.nabble.com/SOLR-4-3-0-How-to-make-fq-optional-tp4066592p4066872.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to