lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doron Cohen <>
Subject FieldCache documentation/exposure
Date Wed, 28 Feb 2007 00:59:45 GMT


I am wondering about the exposure (or not) of FieldCache in the
documentation. FieldCache is used by Lucene, internally, for sort purposes.
Being an interface, it is also exposed as public API, but there seems to be
no pointers/documentation suggesting to use it. Well, except for a brief
mentioning in the FAQ entry "The search is slow when there are many hits".

An application, could however, too, use that caching capability for, say,
accessing a stored (external) ID field. See for instance this recent
discussion in the user list -

The application could access the cache e.g. like this -
    FieldCache fieldCache = FieldCache.DEFAULT;
    String f[] = fieldCache.getStrings(ir,fieldname);

After posting a reply for that in the user list I thought about clarifying
about this possible use - so application developers don't have to go and
write their own cache for this, because Lucene already has that. Guess I
wasn't sure if this is just a place where documentation can be improved
(and junit tests added), or the FieldCache is for some reason considered an
internal implementation detail that applications should not rely on.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message