# Inconsistent Results: multi\_search v. find\_by\_contents

**URL:** <https://www.ruby-forum.com/t/inconsistent-results-multi-search-v-find-by-contents/120445>\
**Category:** Ferret\
**Created:** [November 17, 2007, 12:14am UTC](https://www.ruby-forum.com/t/inconsistent-results-multi-search-v-find-by-contents/120445 "2007-11-17T00:14:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shadreynolds](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/96bed5/32.png) [@shadreynolds](https://www.ruby-forum.com/u/shadreynolds)\
**Post date:** [November 17, 2007, 12:14am UTC](https://www.ruby-forum.com/t/inconsistent-results-multi-search-v-find-by-contents/120445/1 "2007-11-17T00:14:44Z")

</div>

I’m having a problem finding certain types of information using  
multi\_search. Basically, have a number of fields that are not  
tokenized (ids, serial numbers, asset tags, etc). Seems like I can’t  
search for these fields using multi\_search.

class Device \< ActiveRecord::Base  
acts\_as\_ferret :fields=\>{:serial\_number =\> { :index =\> :untokenized  
}}, :store\_class\_name=\>true  
end

Then later on:

Device.find\_by\_contents(“1234-5678-0987”) # =\> 1 Result. Correct.  
Device.multi\_search(“1234-5678-0987”, []) #=\> 0 Results!  
Incorrect!

If I search for other “normal” fields, everything seems to work  
properly. It’s just these :untokenized fields that seem to be  
problematic.

Any help appreciated.

Shad

---

<div class="post-metadata">

**Author:** ![shadreynolds](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/96bed5/32.png) [@shadreynolds](https://www.ruby-forum.com/u/shadreynolds)\
**Post date:** [November 17, 2007, 12:22am UTC](https://www.ruby-forum.com/t/inconsistent-results-multi-search-v-find-by-contents/120445/2 "2007-11-17T00:22:04Z")

</div>

Note: I’m on Ferret 0.11.4 and AAF 0.4.1

Shad
