lucene-dev mailing list archives

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

Hi,

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 -
http://www.nabble.com/Best-way-to-returning-hits-after-search--tf3304485.html

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.

Thoughts?


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message