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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to