# Searchlogic is\_any needs to be switched to equals\_any

**URL:** <https://www.ruby-forum.com/t/searchlogic-is-any-needs-to-be-switched-to-equals-any/184663>\
**Category:** Rails\
**Created:** [March 6, 2010, 3:04am UTC](https://www.ruby-forum.com/t/searchlogic-is-any-needs-to-be-switched-to-equals-any/184663 "2010-03-06T03:04:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Learn\_by\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e274bd/32.png) [@Learn\_by\_D](https://www.ruby-forum.com/u/Learn_by_D)\
**Post date:** [March 6, 2010, 3:04am UTC](https://www.ruby-forum.com/t/searchlogic-is-any-needs-to-be-switched-to-equals-any/184663/1 "2010-03-06T03:04:50Z")

</div>

Does “is\_any” has a bug in searchlogic? “is\_any” used to work fine  
for me. All of a sudden now, for unknown reasons, when I write for  
example :attribute\_is\_any =\> [1] , the sql output is “where  
attribute != 1” which is the opposite of what I want of course.  
Curiously, the problem only occurs when running with a web server  
(mongrel). I see the problem in the log. But when I go to the  
console, it works fine, the correct sql output is shown : “where  
attribute == 1”. Basically, the same searchlogic object returns  
opposite results in the console vs. through the web server.

I had to switch to “equals\_any” The problem goes away. Is this a bug?  
Thanks.

---

<div class="post-metadata">

**Author:** ![Learn\_by\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e274bd/32.png) [@Learn\_by\_D](https://www.ruby-forum.com/u/Learn_by_D)\
**Post date:** [March 6, 2010, 3:45am UTC](https://www.ruby-forum.com/t/searchlogic-is-any-needs-to-be-switched-to-equals-any/184663/2 "2010-03-06T03:45:48Z")

</div>

On Fri, Mar 5, 2010 at 6:03 PM, Ease B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I had to switch to “equals\_any” The problem goes away. Is this a bug?  
> Thanks.

Ease, I would also recommend filing a ticket against this plugin/gem if  
it’s  
truly an issue. Next, It’s not clear what version of the gem you’re  
using  
or  
the version of Ruby. Lastly, the feature of the gem may have been  
deprecated  
and you’ll need to consult its documentation.

-Conrad
