Florent Solt
2006-Aug-24 10:11 UTC
[Ferret-talk] [0.10.0] Index#search_each options ignored
Hi Dave, The options hash is not used in search_each() method. -- Posted via http://www.ruby-forum.com/.
Jens Kraemer
2006-Aug-24 14:29 UTC
[Ferret-talk] [0.10.0] Index#search_each options ignored
On Thu, Aug 24, 2006 at 12:11:38PM +0200, Florent Solt wrote:> Hi Dave, > > The options hash is not used in search_each() method.here''s a patch that fixes this and another minor bug in Index::Index: http://pastie.caboo.se/10032 Jens -- webit! Gesellschaft f?r neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de Schnorrstra?e 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66
Florent Solt
2006-Aug-24 14:47 UTC
[Ferret-talk] [0.10.0] Index#search_each options ignored
Jens Kraemer wrote:> On Thu, Aug 24, 2006 at 12:11:38PM +0200, Florent Solt wrote: >> Hi Dave, >> >> The options hash is not used in search_each() method. > > here''s a patch that fixes this and another minor bug in Index::Index: > http://pastie.caboo.se/10032 >Thanks Jens. I hope Dave will include it in the SVN. PS: Could you explain the test case for the other fix ? (ensure_writer_open) -- Posted via http://www.ruby-forum.com/.
Jens Kraemer
2006-Aug-24 15:01 UTC
[Ferret-talk] [0.10.0] Index#search_each options ignored
On Thu, Aug 24, 2006 at 04:47:35PM +0200, Florent Solt wrote:> Jens Kraemer wrote: > > On Thu, Aug 24, 2006 at 12:11:38PM +0200, Florent Solt wrote: > >> Hi Dave, > >> > >> The options hash is not used in search_each() method. > > > > here''s a patch that fixes this and another minor bug in Index::Index: > > http://pastie.caboo.se/10032 > > > > Thanks Jens. > I hope Dave will include it in the SVN. > > PS: Could you explain the test case for the other fix ? > (ensure_writer_open)It occured to me with acts_as_ferret, where we make use of the :key option for Index::Index, that the writer was not open (@writer was nil) in that if statement. adding the additional ensure_writer_open statement fixed this. I wasn''t able to reproduce that with just Ferret and irb, right now, but if you remove that line from index.rb and run the acts_as_ferret unit tests from current trunk you''ll see it. Jens -- webit! Gesellschaft f?r neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de Schnorrstra?e 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66
Florent Solt
2006-Aug-24 15:07 UTC
[Ferret-talk] [0.10.0] Index#search_each options ignored
> > It occured to me with acts_as_ferret, where we make use of the :key > option for Index::Index, that the writer was not open (@writer was nil) > in that if statement. adding the additional ensure_writer_open statement > fixed this. > > I wasn''t able to reproduce that with just Ferret and irb, right now, but > if you remove that line from index.rb and run the acts_as_ferret unit > tests from current trunk you''ll see it. >Thanks a lot. -- Posted via http://www.ruby-forum.com/.