On Thu, Mar 29, 2007 at 01:07:00PM +0200, P. Schrammel wrote:
> Jens Kraemer wrote:
> ...
> > results = Link.find_by_contents(query)
> > result = results.first
> > result.highlight(query, :field => :description) # returns nil
> > 
> > doc_num = result.document_number
> > 
> > # if you are on aaf trunk:
> > Link.aaf_index.ferret_index.highlight(query, doc_num, :field => 
> > :description)
> > # if on aaf stable:
> > Link.ferret_index.highlight(query, doc_num, :field => :description)
> > 
> > 
> > this would directly use ferret's highlight method. Btw, what version of
> > aaf do you use?
> > 
> ...
> Hi all,
> same Problem here...using gem version 0.11.3. I tried the above but 
> still 'nil'.
> How can I find out if :store is set to :yes?

retrieve a ferret document from the index and try to access the field in
question:

doc = index[doc_num]
puts doc[:field]

if it gives the contents of the field, the field is :store => :yes, if
nil, it isn't.

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