Giter Site home page Giter Site logo

Comments (2)

sarowe avatar sarowe commented on August 19, 2024

Looks like zzReader wasn't initialized - here's the StandardTokenizerImpl statement where the NPE occurs:

923: int numRead = zzReader.read(zzBuffer, zzEndRead,
924: zzBuffer.length-zzEndRead);

If you look at the package javadocs for o.a.l.analysis: http://lucene.apache.org/core/4_1_0/core/org/apache/lucene/analysis/package-summary.html and the tokenstream workflow http://lucene.apache.org/core/4_0_0/core/org/apache/lucene/analysis/TokenStream.html (step 2), you can see the the reset() method on a tokenstream must be called before it's used.

You didn't do that.

Why is this suddenly a problem in Lucene 4.1? Calling reset() prior to consuming a tokenstream has been part of the contract since Lucene 2.9, but has not been strictly enforced. This commit, between the 4.0 and 4.1 releases, triggered the change: http://svn.apache.org/viewvc?view=revision&revision=1401449

from hon-lucene-synonyms.

nolanlawson avatar nolanlawson commented on August 19, 2024

Thanks for the insight! That certainly fixed it; Solr 4.1.0 works fine now. Bad on me for not reading the documentation for TokenStream.

from hon-lucene-synonyms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.