On 14-03-24 11:26 AM, Mirko Sertic wrote:
Ah, ok, so i cannot use PostingsHighlighter as it requires stored fields, right?
The field can be stored anywhere, not necessarily in the index. Here is something that might work:

1. Store the N first characters of your field in a database.
2. Override PostingsHighlighter#loadFieldValues to load the field from the database.
3. Specify your prefix length in PostingHighlighter's constructor.

However, it searches for a snippet only in the beginning of the document.

Hope this help,

Alexandre

Regards
Mirko
Gesendet: Montag, 24. März 2014 um 16:01 Uhr
Von: "Uwe Schindler" <u...@thetaphi.de>
An: java-user@lucene.apache.org
Betreff: RE: Indexing and storing very large documents
Stored fields do not support Readers at the moment.

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de


-----Original Message-----
From: Mirko Sertic [mailto:mirko.ser...@web.de]
Sent: Monday, March 24, 2014 3:03 PM
To: java-user@lucene.apache.org
Subject: Indexing and storing very large documents

Hi there

I am searching for a way to store very large documents in a Lucene 4.7 index
and keep them ready to use the PostingsHighlighter for search result
highlighting.

I do not want to read the whole document into memory, as this would
consume too much memory or could cause an OutOHeapSpace. So i have to
use a Reader. Unfortunately i cannot pass a Reader to a Field with
FieldType.stored() = true. Any ideas? Code examples would be very cool :-)

Thanks in advance
Mirko

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org



--
Alexandre Patry, Ph.D
Chercheur / Researcher
http://KeaText.com


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to