Inconsistent results between multi_search and find_by_contents (is "other" a reserved word?)

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

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’).