Hi!

seems to me you're indexing strings starting with 'index' but you're
searching for 'name'? Or maybe correcting this already was one of your
minimal changes?

If not, try changing that line:
> res = i.search('name*')
to
> res = i.search('index*')

cheers,
Jens

On Wed, Jan 09, 2008 at 04:02:17PM -0500, Noah M. Daniels wrote:
> Hi,
> 
> I'm trying to get parallelized ferret indexing working for my AAF  
> indices, based on the example in the O'Reilly Ferret shortcut.  
> However, the resulting indices after merging seem to have no actual  
> documents.
> 
> I went and made minimal changes to the example in the Ferret shortcut  
> pdf, and indeed can't get that to work either. I'd appreciate any help  
> anyone can give! Thanks!
> 
> The example is below:
> 
> #!/usr/bin/env ruby
> 
> require 'rubygems'
> require 'ferret'
> include Ferret::Index
> 
> 5.times do |i|
>    name = "index#{i}"
>    puts name
>    i = Ferret::I.new(:path => "/tmp/#{i}", :create => true)
>    i << {:name => name}
>    i.close
> end
> readers = []
> readers << IndexReader.new("/tmp/0")
> readers << IndexReader.new("/tmp/1")
> readers << IndexReader.new("/tmp/2")
> readers << IndexReader.new("/tmp/3")
> readers << IndexReader.new("/tmp/4")
> index_writer = IndexWriter.new(:path => "/tmp/test")
> index_writer.add_readers(readers)
> index_writer.close()
> readers.each {|reader| reader.close()}
> i = Ferret::I.new(:path => '/tmp/test')
> res = i.search('name*')
> puts res.inspect # gives me: #<struct Ferret::Search::TopDocs  
> total_hits=0, hits=[], max_score=0.0,  
> searcher=#<Ferret::Search::Searcher:0x58a6ec>>
> 
> puts res.hits.size # gives me: 0
> _______________________________________________
> Ferret-talk mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/ferret-talk
> 

-- 
Jens Krämer
http://www.jkraemer.net/ - Blog
http://www.omdb.org/     - The new free film database
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to