Jack,

First, thanks a lot for your response.

We hardcode certain queries directly in search component as its easy for us
to make changes to the query from SOLR side compared to changing in
applications (as many applications - mobile, desktop etc.. use single SOLR
instance). We don't want to change the code which forms the query every time
the query changes rather just changing the query in SOLR should do the
job...Search team controls the boost and other matching criteria hence
search team changes the boost more often without affecting the
application...Now whenever a particular value is not passed in the query, we
are trying to do a pass through so that the entire query doesn't fail (we
pass through only when the custom plugin is used along with the query - for
ex: !optional is the custom plugin that shouldn't throw any error if a value
for any particular variable is not present)...

<requestHandler name="find" class="solr.SearchHandler" default="true">
<str name="q">
        (
          _query_:"{!dismax qf=lname_i v=$lname}"^8.3 OR
          _query_:"{!dismax qf=lname_phonetic v=$lname}"^8.6
        )
        (
          _query_:"{!optional df='addr' qs=1 v=$where}"^6.2 OR
          _query_:"{!optional df='addr_i' qs=1 v=$where}"^6.2 
        )
        (
          _query_:"{!dismax qf=person_name v=$fname}"^3.9 OR
          _query_:"{!dismax qf=name_phonetic_i v=$fname}"^0.9 OR
        )

      </str>
</>



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Re-How-to-pass-null-OR-empty-values-to-fq-tp4078085p4078094.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to