Hi,
I’m very new to ferret or any search engine for that matter.
111:0> co = Ferret::Index::Index.new :key => :id
112:0> co << {:id => ‘a’, :d => ‘dave’ }
nil
113:0> co << {:id => ‘a’, :d => ‘dave’ }
nil
114:0> co.search_each(‘dave’) {|d,| puts co[d][:id] }
a
a
2
115:0> co << {:id => ‘b’, :d => ‘bob’ }
nil
116:0> co << {:id => ‘b’, :d => ‘bob’ }
nil
117:0> co.search_each(‘bob’) {|d,| puts co[d][:id] }
b
1
118:0>
Looks like Ferret does not like ‘a’ for id. Is this a bug?
This might be trivial and nobody will use ‘a’ for id, but I’ve been
scratching my head for hours wondering :key => :id does not work as
advertised. So I thought I should ask.
thanks in advance
-andre