Comments (2)
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.
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)
- Adding .jar to $SOLR_HOME generates class not found exception? HOT 4
- Compatibility with Solr 6.0.0? HOT 2
- Matches all docs if bf (Boost Function) present HOT 5
- Does it supports fielded search in q parameter? HOT 1
- Is it possible to use it with lucene? HOT 1
- TooManyClauses: maxClauseCount is set to 1024 HOT 2
- Too much memory consumed on queries matching many synonym groups HOT 3
- Does not seem to support singular and plural HOT 3
- Does not return expanded synonyms in highlight terms
- SOLR is slow at first synonym query but quite fast for later queries HOT 1
- Error loading class 'com.github.healthonnet.search.SynonymExpandingExtendedDismaxQParserPlugin' HOT 4
- Error when doing a search
- Not finding any matches... am I being stupid? HOT 2
- boost parameter is not working HOT 2
- Need help on finding logs after synonym expansion for solr HOT 2
- synonyms.constructPhrases not working when synonyms.bag is used...
- Facing error when adding Queryparser to solrconfig.xml
- Allow configuring defaults
- boost Not working when searching for a Synonym
- IS this project Supported any more Beyond Solr 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hon-lucene-synonyms.