Hi,

Given a numerical search term I want to avoid matching the model id as
this has no real world significance when returned in the results (in
this instance).

For example the user may enter '13' when looking for a product code.
Presently they will also get back the product that has id 13.

I have tried:

acts_as_ferret :fields => {:id => { :index => :no }, :description => {},
:manufacturer_code => {}}

However this fails with "You can't store the term vectors of an
unindexed field".

As the id is likely a special case do I need to instead limit the search
somehow when calling the find_by_contents method? Presently I simply
have:

@products = Product.find_by_contents(@phrase, :num_docs => 200)

Any advice much appreciated.

Andrew.

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to