Hi Dave,
I seem to be having trouble retrieving docs from the index. Am I missing
something obvious? BTW, I am on Windows XP, Ruby 1.8.4.
require 'rubygems'
require 'ferret'
p Ferret::VERSION
idx = Ferret::Index::Index.new
idx << {:id => 1, :name => 'Fred', :occupation => 'Toon'}
idx << {:id => 1, :name => 'Barney', :occupation => 'Toon'}
p idx.size
doc = idx[0]
p doc
docs = []
query = '*:fred'
idx.search_each(query) { |doc, score| docs << idx[doc] }
p docs.length
p docs.first
docs = []
query = '*:toon'
idx.search_each(query) { |doc, score| docs << idx[doc] }
p docs.length
p docs.first
=========
ruby test.rb
"0.10.2"
2
{}
1
{}
2
{}
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David Balmain
Sent: Monday, 4 September 2006 2:41 PM
To: [email protected]
Subject: [Ferret-talk] [ANN] 0.10.2 release with win32 gem
Hey all,
I've just released Ferret version 0.10.2. It is mostly just a bug fix
release. The only change is that a highlight method has been added to
Ferret::Index::Index. Please try it out and let me know what you think.
The big news for this release is that there is also a binary win32 gem
included. This is the first time I've build a gem like this so please
let me know if there are any issues.
Cheers,
Dave
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk