sdauletau / elasticsearch-simple-similarity

Elasticsearch "ignore tf-idf" plugin
Apache License 2.0
13 stars 7 forks source link

Building for ES @ 5.6.12 #3

Open missinglink opened 6 years ago

missinglink commented 6 years ago

Hi,

I'm trying to build against elasticsearch 5.6.12 but hitting this error:

/tmp/plugin/src/main/java/org/elasticsearch/plugin/SimpleSimilarityPlugin.java:31: error: incompatible types: invalid constructor reference
        indexModule.addSimilarity("simple-similarity", SimpleSimilarityProvider::new);
                                                       ^
    constructor SimpleSimilarityProvider in class SimpleSimilarityProvider cannot be applied to given types
      required: String,Settings,Settings,ScriptService
      found: String,Settings
      reason: actual and formal argument lists differ in length
/tmp/plugin/src/main/java/org/elasticsearch/index/similarity/SimpleSimilarity.java:29: error: SimpleSimilarity is not abstract and does not override abstract method computeWeight(CollectionStatistics,TermStatistics...) in Similarity
public class SimpleSimilarity extends Similarity {
       ^
/tmp/plugin/src/main/java/org/elasticsearch/index/similarity/SimpleSimilarity.java:47: error: SimpleScore is not abstract and does not override abstract method normalize(float,float) in SimWeight
    private static class SimpleScore extends SimWeight {
                   ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
3 errors
:compileJava FAILED

any ideas? is this version supported?

sdauletau commented 6 years ago

I'm afraid ES 5.x is not supported.

missinglink commented 6 years ago

OK thanks @sdauletau, I got it building on 2.4 instead.

I'm interested in finding a plugin which provides very basic similarity scoring tweaks which builds on 2.4, 5.6 and 6.x.

We have funding available for developing something opensource, if anyone is interested please contact me.