Hi all Consider the following piece of code:
Searcher s = this.getSearcher() def hits = s.search( query, filter, params.offset + params.max, sort ) for( hit in hits.scoreDocs[ lower..<upper ] ){ def obj = binder( s.doc( hit.doc ), hit.doc ) // << here the NPE is thrown } the code *sporadically* throws the following: ... 6 more Caused by: java.lang.NullPointerException at org.apache.lucene.util.CloseableThreadLocal.get(CloseableThreadLocal.java:64) at org.apache.lucene.index.SegmentReader.getFieldsReader(SegmentReader.java:778) at org.apache.lucene.index.SegmentReader.document(SegmentReader.java:879) at org.apache.lucene.index.DirectoryReader.document(DirectoryReader.java:518) at org.apache.lucene.index.IndexReader.document(IndexReader.java:658) at org.apache.lucene.search.IndexSearcher.doc(IndexSearcher.java:144) at SearchableService.asResult(SearchableService.groovy:128) I assume, that the reason for that could be indexing of a new document/ expungeDeletes() / re-openning the IndexReader. Can you elaborate on this? Shall I implement/configure some sort of time-out? Thanks in advance ----- Konstantyn Smirnov, CTO http://www.poiradar.ru www.poiradar.ru http://www.poiradar.com.ua www.poiradar.com.ua http://www.poiradar.com www.poiradar.com http://www.poiradar.de www.poiradar.de -- View this message in context: http://old.nabble.com/NullPointerExc-in-CloseableThreadLocal...-%28Lucene-3.0.0%29-tp27145825p27145825.html Sent from the Lucene - Java Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org