Hi again,
I could reproduce these Results with Ferret 0.9 (Ruby-Version).
The C extension bails out with errors instead failures on the same tests,
because the MultiReader class, which is used to search across indexes
is not accessible from outside of ferret.
Using Ferret 0.3.2, all tests except the test_indexed_method
(which is expected to fail for now and has nothing to do with the
problem here) pass both with Rails 1.0 and Rails 1.1.
All the failures happen on an OR query accross multiple Indexes
that returns more results than expected, simple one-term queries
run fine.
A test I added locally, that updates a single Object, saves it again and
checks if it's still only one in the index runs fine in all scenarios
(Ferret 0.3.2, 0.9-ruby, 0.9-C, Rails 1.1, Linux).
To sum up:
- it doesn't seem to be a Rails issue.
- Ferret 0.9/Ruby behaves somewhat different when using OR queries
across multiple Indexes, but that should not be related to your
problem.
- tests creating and searching on a single index seem to pass in your
environment (e.g. the content_controller_test)
very strange...
here's a test method I just added to content_test.rb (can't commit it
right now) that passes with all variations of Ferret, too.
def test_update
contents_from_ferret = Content.find_by_contents('useless')
assert_equal 1, contents_from_ferret.size
assert_equal @content.id, contents_from_ferret.first.id
@content.description = 'Updated description, still useless'
@content.save
contents_from_ferret = Content.find_by_contents('useless')
assert_equal 1, contents_from_ferret.size
assert_equal @content.id, contents_from_ferret.first.id
contents_from_ferret = Content.find_by_contents('updated AND description')
assert_equal 1, contents_from_ferret.size
assert_equal @content.id, contents_from_ferret.first.id
contents_from_ferret = Content.find_by_contents('updated OR description')
assert_equal 1, contents_from_ferret.size
assert_equal @content.id, contents_from_ferret.first.id
end
hope we can solve this somehow...
Jens
On Thu, Apr 06, 2006 at 09:56:52AM +0200, Kasper Weibel wrote:
> Hmmm, strange happenings are afoot ...
>
> Tell me, do you get the same results with ferret 0.3.2?
>
> Kasper
>
> John McGrath wrote:
>
> > get similar issues with the demo, i'm guessing it might have something
> > to do
> > with changes to ActiveRecord in Rails 1.1.
> >
> > fwiw, my env details again: mac os 10.4.6, mysql 5.0.18, ruby 1.8.4,
> > rails 1.1,
> > ferret 0.9, acts_as_ferret from trunk. i removed all other plugins from
> > my app
> > in case they were conflicting, and still had the same problems.
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Ferret-talk mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/ferret-talk
--
webit! Gesellschaft für neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer [EMAIL PROTECTED]
Schnorrstraße 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk