lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karthik N S" <kart...@controlnet.co.in>
Subject RE: Possible to fetch a document without all fields for performance?
Date Thu, 13 May 2004 07:13:02 GMT

Hey
    Have a look at the  "org.apache.lucene.demo.html.Test.java" in Lucene
1.3 final
   u can strip out the Title or summary from the HTML Page and add it to
relative Index field.

Karthik

-----Original Message-----
From: Morus Walter [mailto:morus.walter@tanto.de]
Sent: Thursday, May 13, 2004 12:32 PM
To: Lucene Users List
Subject: Re: Possible to fetch a document without all fields for
performance?


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).

Morus



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


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


Mime
View raw message