On Thu, May 10, 2007 at 12:21:51PM +0200, Allen Young wrote:
> Allen Young wrote:
> > And how should I construct the query string? "ruby 0.1 <= resistance <= 
> > 0.5"?
> Sorry, I've just realized this is a stupid question, I should use 
> ":description(ruby) :resistance(>=0.1)".

you can also construct your query objects manually, in this case check
out RangeQuery:
http://ferret.davebalmain.com/api/classes/Ferret/Search/RangeQuery.html

> Another question. What if resistance attribute is not in the materials 
> table but in some other table which has a one-to-one relationship with 
> materials table?

define a method that retrieves the value and add the method's name as a
field's name to your call to acts_as_ferret. You might want to search
the list for 'indexed method' for an example of this.

Jens

-- 
Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
[EMAIL PROTECTED] | www.webit.de
 
Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to