Hi All
I have a small problem in setting search fq filter. I referred lots of online documents, and I am not able to achieving OR operation.

I have a custom module. That searches documents using apache solr and apache solr attachment module.

I have a job site, I store the resumes and search resumes using key words like java, mysql etc. I have added a new field salary in solr schema. This field is indexed and stored in solr. I want to search all profiles having salary either 0lacs per annum or 5 to 10 lacs per annum.

My code looks as below.

$keys = "java, mysql";
$min_ctc = 5;
$max_ctc = 10;
$include_0_salary = 1;

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

When $include_0_salary is 1, solr gets number format exception.
When $include_0_salary is 0, solr gets all right documents.

Kindly let me know, is there any mechanism using apache solr module I can do OR operation in such scenarios or it is not possible.

I know it is possible with solr, but with drupal apache solr module this interface is given or not I am not sure. If it is not there, we need to think to putting it. If it is there, then definitely it need to be documented.

Thanks
Kamal