Hi,

I have this piece of code working fine in 6.4.2

MemoryIndex mi = new MemoryIndex();
float fval = 3.3f;
final String floatfield = "floatfield";
DoublePoint ffield = new DoublePoint(floatfield, fval);
mi.addField(floatfield, ffield.tokenS


If I upgrade to 6.5.1 or 6.6.0 I get a NPE here:
Exception in thread "main" java.lang.NullPointerException
at
org.apache.lucene.index.memory.MemoryIndex.storeTerms(MemoryIndex.java:619)
at org.apache.lucene.index.memory.MemoryIndex.addField(MemoryIndex.java:509)
at org.apache.lucene.index.memory.MemoryIndex.addField(MemoryIndex.java:484)
at org.apache.lucene.index.memory.MemoryIndex.addField(MemoryIndex.java:459)
at org.apache.lucene.index.memory.MemoryIndex.addField(MemoryIndex.java:370)


Looking at the code, it looks like in the code path it is being followed,
before, it was checked if teh tokenStream was null or not before calling
MemoryIndex.storeTerms. Now this check is gone, so the NPE.

Is this intended and I should create the field in some other way now? Or is
this just a bug?

xavier

Reply via email to