HI Rafał Kuć
I tried fq=Salary:[5+TO+10]+OR+Salary:0 and as well as fq=Salary:[5 TO 10]
OR Salary:0  both, both the cases I retrieved 0 results.

I use drupal along with solr, my code looks as below.

*           if($include_0_salary == 1)
                {
                    $conditions['fq'][0] = 'salary:[' . $min_ctc . '+TO+' .
$max_ctc . ']+OR+salary:0';
                }
                else
                {
                    $conditions['fq'][0] = 'salary:[' . $min_ctc . ' TO ' .
$max_ctc . ']';
                }
                $conditions['fq'][1] = 'experience:[' . $min_exp . ' TO ' .
$max_exp . ']';

                $results = apachesolr_search_search_execute($keys,
$conditions);
*
Looks when iclude_0_salary is false, I am getting results as expected.
If iclude_0_salary is true, I get 0 results, that means for me
*$conditions['fq'][0]=
salary:[5 TO 10] OR salary:0*  did not work.

Can somebody help me what the wrong I am doing here...

Best regards
kamal




On Wed, May 22, 2013 at 7:00 PM, Rafał Kuć <r....@solr.pl> wrote:

> Hello!
>
> You can try sending a filter like this fq=Salary:[5+TO+10]+OR+Salary:0
>
> It should work
>
> --
> Regards,
>  Rafał Kuć
>  Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - ElasticSearch
>
> > Dear All
> > Can I write a search filter for a field having a value in a range or a
> > specific value.
>
> > Say if I want to have a filter like
> > 1. Select profiles with salary 5 to 10  or Salary 0.
>
> > So I expect profiles having salary either 0 , 5, 6, 7, 8, 9, 10 etc.
>
> > It should be possible, can somebody help me with syntax of 'fq' filter
> > please.
>
> > Best Regards
> > kamal
>
>

Reply via email to