Where is your “b” parameter used? I think that instead of trying to set a new 
“b” http param (which solr will not evaluate as a function), you should instead 
try to insert your function or switch qParser directly where the “b” param is 
used, e.g. in a bq or similar.

A bit heavy weight, but you could of course write a custom SearchComponent to 
construct your “b” parameter...

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

> 10. nov. 2015 kl. 23.52 skrev William Bell <billnb...@gmail.com>:
> 
> We are trying to look at a value, and change another value based on that.
> 
> For example, for national search we want to pass in radius=national, and
> then set another variable equal to 0, else set the other variable = to
> geodist() calculation.
> 
> We tried {!switch} but this only appears to work on fq/q. There is no
> function for constants for equals....
> 
> http://localhost:8983/solr/select?q=*:*&radius=national&b=if(equals($radius,'national'),0,geodist())
> 
> This does not work:
> 
> http://localhost:8983/solr/select?q=*:*&radius=national&b={!switch
> case.national=0 default=geodist() v=$radius}
> 
> Ideas?
> 
> 
> 
> -- 
> Bill Bell
> billnb...@gmail.com
> cell 720-256-8076

Reply via email to