lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karthik N S" <>
Subject RE:
Date Tue, 25 May 2004 08:52:29 GMT
Lucene-Developers Finally found the problem with Highlighter SRC

The Search SRC using search.highlight.Highlighter depends on
storage of the HTML Content  (FIELD_NAME) while Indexing,

If the Content is Stored as

     FileInputStream is = new FileInputStream(File);
     reader = new BufferedReader(new InputStreamReader(is));
     doc.add(Field.Text("contents", reader));

then the search.highlight.Highlighter raises a null Pointer Exception on the
FIELD_NAME  "Content"

	at search.highlight.Highlighter.getBestDocFragments(
	at search.highlight.Highlighter.getBestFragments(
	at search.highlight.Highlighter.getBestFragments(
	at org.apache.lucene.demo.Search.searchIndex1(

But if u use

       Field ff = new Field("contents", proceStr, true, true, true);

      (Where proceStr = Contents of HTML)

Then in such case

   search.highlight.Highlighter   returns a correct Search + Highlighter
(bold) implementation of the Indexed segment.

Now Please some body who is
mature more enough to improve this code please do.

Peace at last      ............. :)

-----Original Message-----
From: Erik Hatcher []
Sent: Monday, May 24, 2004 10:40 PM
To: Lucene Users List
Subject: Re:

On May 24, 2004, at 5:11 AM, Karthik N S wrote:
> I was broswing thru CVS  and found the SRC for  "
> written
> by Ivaylo Zlatev on feb 2002,

Where do you see this?  It is not in the current CVS that I can tell.

> The Tecnique of using RAMDirectory, my Query has really become faster
> access
> ,
> So hence plan to use it  during Indexing process also.

I'm confused by what you're after.  You can index into a RAMDirectory,
no problem, and then persist it to a FSDirectory when you are done with
the current codebase.


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

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

View raw message