<div dir="ltr"><div><div><div><div>John<br></div>Thanks for reply. I fixed it. It was a mistake by me in schema file. Wrongly I typed salary as text field but I assumed it is long type. Hence search result was not proper.<br>
<br></div>Thanks again.<br><br></div>BR,<br></div>kamal<br><div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 22, 2013 at 6:51 PM, John Summerfield <span dir="ltr"><<a href="mailto:summer@js.id.au" target="_blank">summer@js.id.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 22/05/13 09:21, Kamal Palei wrote:<br>
><br>
> Dear All<br>
> I have indexed a salary field for all individuals. If I search without<br>
> any conditions, I get all the records properly.<br>
><br>
> Now I need to search with conditions. Need to get records where salary<br>
> is in a particular range.<br>
><br>
> I am trying a simple code as below.<br>
><br>
</div>> *$conditions['fq'][0] = 'salary:[2 TO 6]';<br>
<div class="im">> $results = apachesolr_search_search_execute($keys, $conditions);<br>
> *<br>
> I get almost 90% records correct. But I got few records where salary<br>
> value is 22.<br>
> Clearly 22 is not in the range of 2 to 6. Can somebody point out whats<br>
> the wrong here.<br>
><br>
> In another case I tried to search as<br>
><br>
</div>> *$conditions['fq'][0] = 'salary:[2 TO 10]';<br>
<div class="im">> $results = apachesolr_search_search_execute($keys, $conditions);<br>
> *<br>
> I did not get any record. I wanted to get records where salary is in<br>
</div>> between 2 to *10*. I do not know whats wrong here, mostly the presence<br>
<div class="im">> of 10 is creating problem.<br>
><br>
> Somebody please help.., or at least point to documentation where I can<br>
> refer and learn.<br>
<br>
</div>If you log SQL statements, you can see the SQL it generates and that<br>
will probably lead you to the solution.<br>
<br>
<br>
I know it's easy to do this with Postgres, I've no idea how easy it is<br>
with the alternatives.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
</font></span></blockquote></div><br></div>