Hey ..

I was thinking about the way I need to use the Ferret::Index::Index Class
and its subclasses .. i find it somehow complex .. I think this can be
done more easily ..

Most of the Time a user needs to open up a index to do queries, the best
way would be to use a IndexReader afaik.

I would suggest to do it that way:

index = Ferret::Index::Index.new( :path => '/some/path',
                                  :readonly => true )

i guess this is far easier than using the Ferret::Index::IndexReader.
Other parameters like auto_flush can be ignored.

Furthermore, reading several indexes should be done like that:

index = Ferret::Index::Index.new( :path => [ '/some/path','/another/path' ],
                                  :readonly => true )

so you dont need to play around with MultiSearcher or MultiReader Classes.

And if possible (and if this api isn't downward compatible anyway) i would
suggest to drop one 'Index' in Ferret::Index::Index

We have a Ferret::Document, a Ferret::Field, so why not have a
Ferret::Index .. doesn't make sense to have a Ferret::Index::Index Class..
at least in the perspective of a user wanting to use ferret.. :-)

Ben


_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to