Bugs: Browse | Submit New | Admin
If Post is indexed and App has_many posts, when I call @app.posts.search(...) without conditions it will fail if sphinx returns posts with a different app_id. Sphincter calls "find ids" on the results, and that #find is wrapped by with_conditions that will sometimes filter out posts, so the error message that you get back is "Couldn't find Post with ID=X" where X actually exists. If you think it's worth automatically adding the conditions to the sphinx filter or returning a more informative error message I can submit a patch.
Add A Comment:
Date: 2007-08-05 20:13 Sender: Michael Nutt Unfortunately sphinx's ruby bindings only support filter conditions with numeric values, so I think that automatically adding an association's scope would be a bad idea. I don't think it's worth the trouble until sphinx's ruby api is fixed.
Date: 2007-08-03 02:14 Sender: Eric Hodel I think its worth automatically adding the conditions to sphinx's filter. Can you submit a patch? Or some example code that fails, if you don't want to.