More specific queries via IndexReader

We would like to show a list of “most recently added terms”, meaning,
the results of this query:

Resource.aaf_index.ferret_index.reader.terms(:summary)

BUT, only returning terms from a certain set of documents (in our
case, we are going to filter by creation data).

Is this possible?

Thanks,
John

On Jun 16, 2007, at 2:59 PM, John B. wrote:

We would like to show a list of “most recently added terms”, meaning,
the results of this query:

Resource.aaf_index.ferret_index.reader.terms(:summary)

BUT, only returning terms from a certain set of documents (in our
case, we are going to filter by creation data).

Is this possible?

Actually I just discovered that when using the drb server, the
ferret_index cannot be accessed. So I imagine it is impossible to
access the index’s terms at all?

John

On Sat, Jun 16, 2007 at 03:20:27PM -0400, John B. wrote:

Is this possible?

Actually I just discovered that when using the drb server, the
ferret_index cannot be accessed. So I imagine it is impossible to
access the index’s terms at all?

Yeah, the DRb server is not exposing the ferret index to the outside.
You can however extend aaf’s LocalIndex class (where ferret_index is
available) with a custom terms method and call that via DRb (aaf_index
is an instance of LocalIndex in local and of RemoteIndex in DRb mode,
but RemoteIndex routes all calls via method_missing through to the
remote LocalIndex instance).

Just be sure to not pull complex Ferret objects (like IndexReaders)
across the DRb connection.

regarding the original problem - I’m not sure but would guess you can’t
filter the terms result to only include terms from some documents.

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