Jens Kraemer wrote:
> I'd just rescue that and return nil for the field:
> 
>    Property2.ferret_fields.keys.each do |field|
>      define_method("#{field}") do
>        result = property.send("#{field}") rescue nil
>      end
>    end
> 
For now, I'm rescuing the "NoMethodError" which works fine as well.

>> 2. Say "Property1" has 500 fields as well as "Property2", each product
>> will be indexed using 1000 fields while only at most 500 fields contains
>> value.
> 
> Do you really need to be able to run queries against each single one of
> these 1000 fields? If not, you could concatenate their values into a
> single large :properties field.
I'm afraid so... because many of these fields are number fields and 
users will want to search these fields like "field1 is bigger than 1.5 
and smaller than 0.7".

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to