# Ferret question - need help with syntax for exact matching

**URL:** <https://www.ruby-forum.com/t/ferret-question-need-help-with-syntax-for-exact-matching/154306>\
**Category:** Rails\
**Created:** [November 27, 2008, 2:57pm UTC](https://www.ruby-forum.com/t/ferret-question-need-help-with-syntax-for-exact-matching/154306 "2008-11-27T14:57:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/aca169/32.png) [@jamie](https://www.ruby-forum.com/u/jamie)\
**Post date:** [November 27, 2008, 2:57pm UTC](https://www.ruby-forum.com/t/ferret-question-need-help-with-syntax-for-exact-matching/154306/1 "2008-11-27T14:57:11Z")

</div>

My apologies, since this may not exactly be the appropriate place for  
this post, but… posted this on the Ruby Ferret Forum, and did not  
get any responses (board is not very active)

I have a need for a layer of access control when performing a query on  
the ferret index. The solution is to add an dditional clause (e.g. -  
access\_teams:12 OR 13 OR 14 OR 22 OR 1). In order for this to work, I  
need exact matching. This query does not perform an exact match. It  
appears if the index record has access\_teams=2 the query will return  
this record.

Can someone help me with the syntax for exact matching?

---

<div class="post-metadata">

**Author:** ![jamie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/aca169/32.png) [@jamie](https://www.ruby-forum.com/u/jamie)\
**Post date:** [November 29, 2008, 10:55am UTC](https://www.ruby-forum.com/t/ferret-question-need-help-with-syntax-for-exact-matching/154306/2 "2008-11-29T10:55:51Z")

</div>

jamie wrote:

> I have a need for a layer of access control when performing a query on  
> the ferret index. The solution is to add an dditional clause (e.g. -  
> access\_teams:12 OR 13 OR 14 OR 22 OR 1). In order for this to work, I  
> need exact matching. This query does not perform an exact match. It  
> appears if the index record has access\_teams=2 the query will return  
> this record.
> 
> Can someone help me with the syntax for exact matching?

Perhaps

+access\_teams:12|13|14|22|1

–  
Rails Wheels - Find Plugins, List & Sell Plugins -  
[http://railswheels.com](http://railswheels.com)
