com.epam.indigo.predicate.BaseMatch Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bingo-elastic Show documentation
Show all versions of bingo-elastic Show documentation
Elasticsearch chemistry database search tool
The newest version!
package com.epam.indigo.predicate;
import com.epam.indigo.model.IndigoRecord;
import org.elasticsearch.script.Script;
/**
* Base class for match, all different matches should be extended from this one
*/
public abstract class BaseMatch extends IndigoPredicate {
private final T target;
private final float threshold;
public BaseMatch(T target) {
this(target, 0.0f);
}
public BaseMatch(T target, float threshold) {
this.target = target;
this.threshold = threshold;
}
public T getTarget() {
return target;
}
public float getThreshold() {
return threshold;
}
public abstract String getFingerprintName();
public abstract Script generateScript();
public abstract String getMinimumShouldMatch(int length);
}