[email protected]
[Top] [All Lists]


Subject: doc.get"contents"
From: "miki sun"
Date: Thu, 06 Apr 2006 20:19:24 +0000
Dear all

I got a java.lang.NullPointerException at java.io.StringReader.<init>(StringReader.java:33) error when processing the following code:

for (int i = 0; i < theHits.length(); i++)
Document doc = theHits.doc(i);
String contents = doc.get("contents") ;
TokenStream tokenStream = analyzer.tokenStream( "contents", new StringReader(contents)) ;
System.out.println(theHighlighter.getBestFragment(tokenStream, contents));

I used demo.IndexFiles to index my directory. Who can tell me what's wrong? Thanks a lot!


To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

<Prev in Thread] Current Thread [Next in Thread>