I'm more than a little skeptical about your intentions here... just clean up
your code and pass clean parameters ONLY!!!
Why is that so difficult?
You should have an application layer between your application client and
Solr, anyway, so what's the difficulty? I mean, why are you just trying so
hard just to avoid a few conditional statements in your app layer??
-- Jack Krupansky
-----Original Message-----
From: SolrLover
Sent: Monday, July 15, 2013 11:43 AM
To: solr-user@lucene.apache.org
Subject: How to pass null OR empty values to fq?
Hi,
I am trying to pass empty values to fq parameter but passing null (or empty)
doesn't seem to work for fq.
Something like...
q=*:*&fq=(field1:test OR null)
We are trying to make fq more tolerant by making not fail whenever a
particular variable value is not passed..
Ex:
/select?q=*:*&fq=lname:$lname --> lname is empty here and I dont want the
query to fail rather than just do a pass through and return everything
(returned by q). I can't really use swich plugin directly as I have more
number of cases to handle hence I am trying to handle it by creating a
custom component extending the Qparserplugin..
--
View this message in context:
http://lucene.472066.n3.nabble.com/How-to-pass-null-OR-empty-values-to-fq-tp4078081.html
Sent from the Solr - User mailing list archive at Nabble.com.