Nitin Gupta created OAK-9066:
--------------------------------

             Summary: oak-solr-osgi does not have all the entries for SPIs for 
TokenFilterFactory, which leads to problems initializing cores in embedded solr 
server
                 Key: OAK-9066
                 URL: https://issues.apache.org/jira/browse/OAK-9066
             Project: Jackrabbit Oak
          Issue Type: Bug
            Reporter: Nitin Gupta


This change 
[https://github.com/apache/jackrabbit-oak/commit/c5e2b69467589931bf3e3eb9ff246889d272452e]
 , both lucene and solr versions were at 4.7.1 .

Post this solr became 5.5.5 while lucene remained at 4.7.1

Now, the problem arises due to lucene-suggest jar. Till 4.7.1, there were no 
SPIs for TokenFilterFactory in lucene-suggest (they were only in 
lucene-analyzers-commons).

With 5.5.5, lucene-suggest added this SPI 
[https://github.com/apache/lucene-solr/blob/master/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/SuggestStopFilterFactory.java]
 .

So now we have 2 META-INF/services for 
org.apache.lucene.analysis.util.TokenFilterFactory, one coming from 
lucene-suggest and the other coming from lucene-analyzers-commons, and somehow 
instead of getting merged in the final oak-solr-osgi bundle, the lucene-suggest 
one overrides the other and ultimately the SPIs from lucene-analyzers-commons 
(which include solr.PatternCaptureGroupFilterFactory) don't make it to the 
references in the oak-solr-osgi bundle.

 

This leads to exceptions such as
Caused by: org.apache.solr.common.SolrException: Can't load schema 
\solr\oak\conf\schema.xml: Plugin init failure for [schema.xml] fieldType 
"descendent_path": Plugin init failure for [schema.xml] analyzer/filter: Error 
loading class 'solr.PatternCaptureGroupFilterFactory'Caused by: 
org.apache.solr.common.SolrException: Can't load schema 
while using the oak-solr-osgi bundle in an osgi environment.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to