Hi ! I would like to rebuild a part of a document that I have indexed with Lucene without reopen it and parsing it again.
In fact, I would like to reconstitute the parts of the documents which corresponds to a search. Here is an example of what I would like to obtain : String myDocumentIndexed = "Of all the amazing tales told about the Titanic, there is one little story I always find fascinating even though it tells us absolutely nothing about the details of the TRAGIC sinking on that cold night in April 1912." + "It is not the fact that the great liner was designed and had the space to carry 48 lifeboats but only 16 were actually included to fulfil the letter of the law. It was not the fact that in spite of ice WARNINGS the ship's speed was not reduced. If it had been, then fewer watertight compartments would have been flooded, and the ship would have remained afloat much longer, and possibly been salvaged."; I release a search on "TRAGIC WARNINGS", I get a Hits instance containing my document (path + indexed content). On this resulting document, I would like to have a "summary" corresponding to my request "TRAGIC WARNINGS" such as this (or such as Google) : "... nothing about the details of the TRAGIC sinking on that cold night .. the fact that in spite of ice WARNINGS the ship's speed was not reduced ..." And I would like to obtain this summary without reopen my document (big PDF) and without parsing it again. For the moment, I can have the "summary" but only if I parse again my PDF document (it takes about 60s per document, it's to uch). Is it possible to rebuild a part of an indexed document ? And, if it is, how to do this ? Thanks a lot !
