Forum: Ferret highlighting from multiple indexes

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
F7ea1cdafb2334edc04598a60188a37a?d=identicon&s=25 Jeff Mallatt (Guest)
on 2007-07-19 22:31
(Received via mailing list)

I'm searching multiple indexes by passing an array of paths to  I get several hits back, and can determine
the document id of each.

Now I want to fetch highlighted excerpts from a field in one of the
matched documents.  The problem I'm having is that Index::IndexReader
doesn't have a highlight() method.  And, while Index::Index does have
a highlight() method, its new() method doesn't allow for an array of

What am I missing, here?

Thanks in advance.
C9dd93aa135988cabf9183d3210665ca?d=identicon&s=25 Jens Kraemer (Guest)
on 2007-07-20 10:31
(Received via mailing list)
On Thu, Jul 19, 2007 at 03:30:17PM -0400, Jeff Mallatt wrote:
> What am I missing, here?

The Searcher class :-)
Create a searcher from your IndexReader and use it's highlight method.


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 |

Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa
This topic is locked and can not be replied to.