Hello all again,
I have a problem indexing new documents in my upgraded solr version (from 8.11 
to 9.4)
I changed the solrconfig.xml to adhere the recent syntax:
        <filter class="solr.StopFilterFactory" ignoreCase="true" 
words="stopwords.txt" />
was changed to
        <filter name="stop" ignoreCase="true" words="stopwords.txt" />

The core loads correctly, but when I try to index a document I see an error in 
the logs

2023-12-29 07:46:38.191 ERROR (qtp2035381640-19) [ x:COSBIBioIndexTest 
t:localhost-41] o.a.s.h.RequestHandlerBase Client exception => 
org.apache.solr.common.SolrException: Exception writing document id 
PUBMEDPMC8101124 to the index; possible analysis error.
        at 
org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:335)
...
Caused by: java.lang.NullPointerException: stopWords
        at java.util.Objects.requireNonNull(Objects.java:246) ~[?:?]
        at org.apache.lucene.analysis.StopFilter.<init>(StopFilter.java:39) 
~[?:?]
        at 
org.apache.lucene.analysis.core.StopFilter.<init>(StopFilter.java:43) ~[?:?]
        at 
org.apache.lucene.analysis.core.StopFilterFactory.create(StopFilterFactory.java:91)
 ~[?:?]
        at 
org.apache.solr.analysis.TokenizerChain.createComponents(TokenizerChain.java:132)
 ~[?:?]
        at 
org.apache.lucene.analysis.AnalyzerWrapper.createComponents(AnalyzerWrapper.java:120)
 ~[?:?]
        at 
org.apache.lucene.analysis.AnalyzerWrapper.createComponents(AnalyzerWrapper.java:120)
 ~[?:?]
        at org.apache.lucene.analysis.Analyzer.tokenStream(Analyzer.java:193) 
~[?:?]
        at org.apache.lucene.document.Field.tokenStream(Field.java:491) ~[?:?]
        at 
org.apache.lucene.index.IndexingChain$PerField.invertTokenStream(IndexingChain.java:1162)
 ~[?:?]
        at 
org.apache.lucene.index.IndexingChain$PerField.invert(IndexingChain.java:1146) 
~[?:?]
        at 
org.apache.lucene.index.IndexingChain.processField(IndexingChain.java:697) 
~[?:?]
        at 
org.apache.lucene.index.IndexingChain.processDocument(IndexingChain.java:576) 
~[?:?]
        at 
org.apache.lucene.index.DocumentsWriterPerThread.updateDocuments(DocumentsWriterPerThread.java:242)
 ~[?:?]
        at 
org.apache.lucene.index.DocumentsWriter.updateDocuments(DocumentsWriter.java:432)
 ~[?:?]
        at 
org.apache.lucene.index.IndexWriter.updateDocuments(IndexWriter.java:1545) 
~[?:?]
        at 
org.apache.lucene.index.IndexWriter.updateDocuments(IndexWriter.java:1521) 
~[?:?]
        at 
org.apache.solr.update.DirectUpdateHandler2.updateDocOrDocValues(DirectUpdateHandler2.java:1062)
 ~[?:?]
        at 
org.apache.solr.update.DirectUpdateHandler2.doNormalUpdate(DirectUpdateHandler2.java:421)
 ~[?:?]
        at 
org.apache.solr.update.DirectUpdateHandler2.addDoc0(DirectUpdateHandler2.java:374)
 ~[?:?]
        at 
org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:311)
 ~[?:?]


The file 'stopwords.txt' is present in the core/conf/stopwords.txt

What is the issue here?
Thank you for your help and patience
D

[cid:64242f24-e2b8-4938-9c49-e481a57e744f]<https://www.cosbi.eu/>

Danilo Tomasoni

Data Scientist & Software Engineer
+39 0464 808845

tomas...@cosbi.eu <mailto:tomas...@cosbi.eu>

www.cosbi.eu

<http://www.cosbi.eu/>

[cid:a14339fc-2356-476c-9eb0-af847f2db2ad]<https://twitter.com/FoundationCosbi/>[cid:15321cd4-5352-4c43-b740-65f0e534ba33]<https://www.linkedin.com/company/cosbi/>

Reply via email to