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
Great, Successfully installed on WindowsXP with InstantRails. F:\>gem install ferret-0.10.2-mswin32.gem Attempting local installation of ''ferret-0.10.2-mswin32.gem'' Successfully installed ferret, version 0.10.2 Installing RDoc documentation for ferret-0.10.2-mswin32... F:\>irb -rrubygems irb(main):001:0> require ''ferret'' => false irb(main):002:0> include Ferret => Object irb(main):003:0> index = Index::Index.new() => #<Ferret::Index::Index:0x292ba30 @open=true, @mon_owner=nil, @id_field=:id, @ options={:analyzer=>#<Ferret::Analysis::StandardAnalyzer:0x292b868>, :dir=>#<Fer ret::Store::RAMDirectory:0x292b9e8>, :default_field=>:*, :lock_retry_time=>2}, @ reader=nil, @mon_waiting_queue=[], @writer=nil, @default_input_field=:id, @dir=# <Ferret::Store::RAMDirectory:0x292b9e8>, @mon_entering_queue=[], @qp=nil, @searc her=nil, @mon_count=0, @default_field=:*, @auto_flush=false> On 9/4/06, David Balmain <dbalmain.ml at gmail.com> wrote:> 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 > Ferret-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/ferret-talk >-- hui http://blog.treasured.cn skype: bourne.z
David Balmain wrote:> 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, > DaveWhat happens when I upload my site from Windows XP to a Linux host, do I have to get another gem? This is the only thing I''m really unsure about. Obviously I need the Win32 as my test environment is a Windows machine. -- Posted via http://www.ruby-forum.com/.
> What happens when I upload my site from Windows XP to a Linux host, do I > have to get another gem? This is the only thing I''m really unsure about. > Obviously I need the Win32 as my test environment is a Windows machine.Hey .. it''s the same gem.. just run "gem install ferret" on your windows and your linux machine.. gem will take care of the rest.. :-) Ben
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: ferret-talk-bounces at rubyforge.org [mailto:ferret-talk-bounces at rubyforge.org] On Behalf Of David Balmain Sent: Monday, 4 September 2006 2:41 PM To: ferret-talk at rubyforge.org 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 Ferret-talk at rubyforge.org http://rubyforge.org/mailman/listinfo/ferret-talk
On 9/5/06, Neville Burnell <Neville.Burnell at bmsoft.com.au> wrote:> 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.firstHi Neville, Documents are now lazy loading so they just look like an empty hash unless you load all the fields. So you could try this; p docs.first.load And you''ll see all the stored fields loaded. Ofcourse, you don''t need to call the load method to access the fields. Just refrencing a field will load it automatically. p docs.first[:occupation] Hope that helps, Dave
Hi Dave,> Documents are now lazy loading so they just look > like an empty hash unless you load all the fields. > So you could try this; > > p docs.first.load > > And you''ll see all the stored fields loaded. Ofcourse, > you don''t need to call the load method to access the fields. > Just refrencing a field will load it automatically. > > p docs.first[:occupation]I see now, thanks! Neville
Just a quick note of thanks for the Win32 gem. On my system, Ferret indexing is about 20x faster and Ferret searching is about 100x faster. Neville -----Original Message----- From: ferret-talk-bounces at rubyforge.org [mailto:ferret-talk-bounces at rubyforge.org] On Behalf Of David Balmain Sent: Monday, 4 September 2006 2:41 PM To: ferret-talk at rubyforge.org 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 Ferret-talk at rubyforge.org http://rubyforge.org/mailman/listinfo/ferret-talk