# Inconsistent results between multi\_search and find\_by\_contents (is "other" a reserved word?)

**URL:** <https://www.ruby-forum.com/t/inconsistent-results-between-multi-search-and-find-by-contents-is-other-a-reserved-word/117320>\
**Category:** Ferret\
**Created:** [October 15, 2007, 11:47pm UTC](https://www.ruby-forum.com/t/inconsistent-results-between-multi-search-and-find-by-contents-is-other-a-reserved-word/117320 "2007-10-15T23:47:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shad\_Reynolds](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/82dd89/32.png) [@Shad\_Reynolds](https://www.ruby-forum.com/u/Shad_Reynolds)\
**Post date:** [October 15, 2007, 11:47pm UTC](https://www.ruby-forum.com/t/inconsistent-results-between-multi-search-and-find-by-contents-is-other-a-reserved-word/117320/1 "2007-10-15T23:47:46Z")

</div>

I have a Computer type and I’m trying to query agianst it. When I do  
the query with find\_by\_contents, I get correct results. However, when  
I query using multi\_search, I get incorrect results.

I’m using the most recent version of Acts As Ferret and Ferret

This returns the correct results:  
Computer.find\_by\_contents( “device\_type:laptop AND os\_type:other” )

This returns too many results:  
Computer.multi\_search( “device\_type:laptop AND os\_type:other”, [] )

Oddly, these queries are consistent when I query for os\_type:windows.  
I feel like my use of the word “other” is throwing something off.

Ideas?

Thanks,  
Shad

---

<div class="post-metadata">

**Author:** ![Shad\_Reynolds](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/82dd89/32.png) [@Shad\_Reynolds](https://www.ruby-forum.com/u/Shad_Reynolds)\
**Post date:** [October 19, 2007, 11:48pm UTC](https://www.ruby-forum.com/t/inconsistent-results-between-multi-search-and-find-by-contents-is-other-a-reserved-word/117320/2 "2007-10-19T23:48:01Z")

</div>

Shad Reynolds wrote:

> I have a Computer type and I’m trying to query agianst it. When I do  
> the query with find\_by\_contents, I get correct results. However, when  
> I query using multi\_search, I get incorrect results.
> 
> I’m using the most recent version of Acts As Ferret and Ferret
> 
> This returns the correct results:  
> Computer.find\_by\_contents( “device\_type:laptop AND os\_type:other” )
> 
> This returns too many results:  
> Computer.multi\_search( “device\_type:laptop AND os\_type:other”, [] )
> 
> Oddly, these queries are consistent when I query for os\_type:windows.  
> I feel like my use of the word “other” is throwing something off.
> 
> Ideas?
> 
> Thanks,  
> Shad

“other” is in the list of stop words used by the standard analyzer by  
default. I’m guessing you want to use an analyzer with no stop words  
(e.g. StandardAayzer.new([]), where the [] is for ‘stop words == empty  
list’).
