<div dir="ltr"><a href="http://wiki.apache.org/solr/SolrQuerySyntax">http://wiki.apache.org/solr/SolrQuerySyntax</a><br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 23, 2013 at 12:28 PM, Kamal Palei <span dir="ltr">&lt;<a href="mailto:palei.kamal@gmail.com" target="_blank">palei.kamal@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear All<br>I am trying to write a search filter for a field having a value in a range or a specific value.<br>
<br>Say if I want to have a filter like<br>1. Select profiles with salary 5 to 10  or Salary 0.<br>
<br>So I expect profiles having salary either 0 , 5, 6, 7, 8, 9, 10 etc.<br><br>To do this, I have written code as below.<br><br><br>    $index = 0;<br>    if($include_0_salary == 1)<br>    {<br>        $conditions[&#39;fq&#39;][$index++] = &#39;salary:[&#39; . $min_ctc . &#39;+TO+&#39; .<br>

        $max_ctc . &#39;]+OR+salary:0&#39;;<br>    }<br>    else<br>    {<br>        $conditions[&#39;fq&#39;][$index++] = &#39;salary:[&#39; . $min_ctc . &#39; TO &#39; . $max_ctc . &#39;]&#39;;<br>    }<br><br>    $results = apachesolr_search_search_execute($keys, $conditions);<br>

    <br>When $include_0_salary is false, it gives me expected result. When $include_0_salary is true, solr server crashes.<br><br>I am sure, the way I am setting the fq param, is not proper. Has somebody done this previously, kindly help, suggest me whats the right syntax.<br>

<br>Thanks<span class="HOEnZb"><font color="#888888"><br>kamal<br></font></span></div>
<br>--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br></blockquote></div><br><br clear="all"><br>-- <br>Warm regards,<br>Chandra Shekhar<br><br>Srijan Technologies Pvt. Ltd.<br>
303 Solitaire Plaza,<br>Near Guru DronaCharya Metro station<br>
Gurgaon -122002<br>
Haryana<br>

website : <a href="http://www.srijan.in/" target="_blank">www.srijan.in</a>        <br><br>Wordpress : <a href="http://ananddhara.wordpress.com" target="_blank">http://ananddhara.wordpress.com</a><br>Twitter : <a href="http://twitter.com/ananddhara" target="_blank">http://twitter.com/ananddhara</a><br>
Scribd : <a href="http://www.scribd.com/ananddhara" target="_blank">http://www.scribd.com/ananddhara</a><br>Facebook : <a href="http://www.facebook.com/ananddhara" target="_blank">http://www.facebook.com/ananddhara</a>
</div>