HI Dave,

Le 5 sept. 06, à 02:24, David Balmain a écrit :
> Ahhhh, of course. Sorry. Jens mentioned that yesterday so I should
> have realized. You need to store the field as well as its term vector
> :with_positions_offsets if you want to highlight it. The :term_vector
> setting is :with_positions_offsets by default in aaf so you only need
> to change the :store setting for the field you want to highlight.

I'm not convinced about storing everything once more whereas I already 
store the texts in db. More, I don't know how to do it in aaf ;-)

> By the way, Myclass.ferret_index.doc(12) will always return {}. The
> documents are lazy loading now so Myclass.ferret_index.doc(12)[:id]
> will return the model ID. You can load all fields with the load
> method. Try;
>
>     puts Myclass.ferret_index.doc(12).load().inspect()
>
> That should show you which fields are actually stored which in the
> case of acts_as_ferret will only be the model ID (I think??).

You are right. Anyway, I stick to my own ruby highlighting atm.

Jean-Christophe Michel

_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to