Hi John,

There is no API for this, but I recall somebody talking about adding
support for this a few months back.  I even think that somebody might
have contributed a patch for this.  I am not certain about this, but
check the patch queue (link on Lucene site).  If there is a patch
there, even if the patch no longer applies cleanly, you'll be able to
borrow the code for your own patch.  Also note that the CVS version has
support for field compression, which should help with performance if
you are working with large fields.

Otis

--- John Wang <[EMAIL PROTECTED]> wrote:

> Hi:
> 
>    Is there some way to read only 1 field value from an index given a
> docID?
> 
>    From the current API, in order to get a field from given a docID,
> I
> would call:
>  
>     IndexSearcher.document(docID)
> 
>      which in turn reads in all fields from the disk.
> 
>    Here is my problem:
> 
>            After the search, I have a set of docIDs. For each
> document, I have a unique string identifier. At this point I only
> need
> these identifiers but with the above API, I am forced to read the
> entire row of fields for each document in the search result, which in
> my case can be very large.
> 
>            Is there an alternative?
> 
> I am thinking more on the lines of a call:
> 
>            Field[] getFields(int docID,String fieldName);
> 
> Thanks
> 
> -John
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to