we have developed a plugin (siren) for elasticsearch that adds a new posting format. The last version of the plugin was released for elasticsearch 1.3.x. Today we are trying to upgrade it for elasticsearch 1.7.x, and we encounter an issue related to the SPI class that is not found in the classpath.
After installing the plugin in elasticsearch, all the jars including the one containing the SPI class and the META-INF/services/org.apache.lucene.codecs.PostingsFormat file referencing our posting format class are located in the plugins/siren-plugin directory. The plugin is loaded properly by elasticsearch, but when we try to index documents that use this posting format, we got the following exception:
Caused by: java.lang.IllegalArgumentException: An SPI class of type org.apache.lucene.codecs.PostingsFormat with name 'Siren10AFor' does not exist. You need to add the corresponding JAR file supporting this SPI to your classpath. The current classpath supports the following names: [es090, completion090, XBloomFilter, Lucene40, Lucene41, IDVersion]
If we move the jar containing the spi class directly to the lib directory of elasticsearch, then things are working properly. It looks like that the META-INF/services/org.apache.lucene.codecs.PostingsFormat file is not properly loaded when located in the plugins directory. We are aware of some changes regarding the support of custom posting formats in elasticsearch since 1.3.x, and we were wondering if those changes are not related to this issue ?