io.quarkus.redis.datasource.autosuggest.Suggestion Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-redis-client Show documentation
Show all versions of quarkus-redis-client Show documentation
Connect to Redis in either imperative or reactive style
package io.quarkus.redis.datasource.autosuggest;
/**
* Represent a suggestion.
*
* If the {@code SUGGET} command is executed with the {@code WITHSCORES} parameter, the suggestion also contains the
* score. {@code 0.0} otherwise.
*/
public class Suggestion {
private final String suggestion;
private final double score;
public Suggestion(String suggestion, double score) {
this.suggestion = suggestion;
this.score = score;
}
public Suggestion(String suggestion) {
this(suggestion, 0.0);
}
/**
* @return the suggestion
*/
public String suggestion() {
return suggestion;
}
/**
* @return the score, 0.0 is not available.
*/
public double score() {
return score;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy