lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Krupansky <jack.krupan...@gmail.com>
Subject Re: Issue with if() statement
Date Fri, 01 Jan 2016 00:28:39 GMT
You can't have spaces in a function query - the %20 will get expanded to a
space (just as a "+" would.)

And fq is "filter query" anyway, not "function query". Try: fq={!func}...

Not sure what the solution to those embedded spaces is, but you probably
need function queries there as well.


-- Jack Krupansky

On Thu, Dec 31, 2015 at 6:50 PM, William Bell <billnbell@gmail.com> 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?
>
>
> --
> Bill Bell
> billnbell@gmail.com
> cell 720-256-8076
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message