lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morus Walter <>
Subject Re: Possible to fetch a document without all fields for performance?
Date Thu, 13 May 2004 07:01:31 GMT
Kevin Burton writes:
> Say I have a query result for the term Linux... now I just want the 
> TITLE of these documents not the BODY.
> To further this scenario imagine the TITLE is 500 bytes but the  BODY is 
> 50M. 
> The current impl of fetching a document will pull in ALL 50,000,500 
> bytes not just the 500 that I need. 
> Obviously if I could just get the TITLE field this would be a HUGE speedup.
> Is there a somewhat simple and efficient way to get a document with a 
> restricted set of fields?  Digging through the API it didnt' seem obvious.
I don't understand that.
You get the document object which does not contain the documents field
contents. It just provides access to this data.
It's up to you which fields you access.
And remember that you don't have to store fields at all, if you don't need 
to retrieve them (e.g. because the original documents are somewhere else). 


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

View raw message