Hi everybody,
After staring at the a_a_f API for quite sometime now, I decided it's
time to ask...
Which method should I use to get content from the index without using
highlight? Consider the following controller action:
def preview
if params[:search].blank? # normal case
@text = @myfile. # which method do I use here to get the :text from
the index???
else # if we come from the search results page
@text = @myfile.highlight(params[:search], { :field => :text,
:excerpt_length => :all, :pre_tag => '[highlight]', :post_tag =>
'[/highlight]' })
end
end
I didn't store my text in the database, only in the index. When I'm
coming from a search I use the highlight method, so the term I searched
for gets highlighted, but how do I get the text from the index in a
'normal case'. The highlight method feels inappropriate, because I don't
want to highlight anything. I don't see what other method to use.
Thanks in advance!
Mischa.
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk