On Thu, Dec 31, 2015, at 11:50 PM, William Bell wrote:
> We are getting weird results with if(exists(a),b,c). We are getting b+c!!
> 
> http://localhost:8983/solr/providersearch/select?q=*:*&wt=json&state=state:%22CO%22&state1=state:%22NY%22&fq=if(exists(query($state1)),{!lucene%20v=$state1},{!lucene%20v=$state})
> 
> I am getting NY and CO!
> 
> I only want $state1, which is NY.
> 
> Any other ways to craft this?

Does this work at all?

The if() function is a function query that can be used to sort, boost
and as calculated fields. I haven't seen them used in filtering.

Also, the query() function does *not* do a query, it just says "what
would this document score for this query?"

Can you describe in English what you are trying to do?

Upayavira

Reply via email to