Class BlockingAutoSuggestCommandsImpl<K>
- java.lang.Object
-
- io.quarkus.redis.runtime.datasource.AbstractRedisCommandGroup
-
- io.quarkus.redis.runtime.datasource.BlockingAutoSuggestCommandsImpl<K>
-
- All Implemented Interfaces:
AutoSuggestCommands<K>
,RedisCommands
public class BlockingAutoSuggestCommandsImpl<K> extends AbstractRedisCommandGroup implements AutoSuggestCommands<K>
-
-
Field Summary
-
Fields inherited from class io.quarkus.redis.runtime.datasource.AbstractRedisCommandGroup
ds, timeout
-
-
Constructor Summary
Constructors Constructor Description BlockingAutoSuggestCommandsImpl(RedisDataSource ds, ReactiveAutoSuggestCommands<K> reactive, Duration timeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
ftSugAdd(K key, String string, double score, boolean increment)
Execute the command FT.SUGADD.boolean
ftSugDel(K key, String string)
Execute the command FT.SUGDEL.List<Suggestion>
ftSugGet(K key, String prefix)
Execute the command FT.SUGGET.List<Suggestion>
ftSugGet(K key, String prefix, GetArgs args)
Execute the command FT.SUGGET.long
ftSugLen(K key)
Execute the command FT.SUGLEN.-
Methods inherited from class io.quarkus.redis.runtime.datasource.AbstractRedisCommandGroup
getDataSource
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.quarkus.redis.datasource.autosuggest.AutoSuggestCommands
ftSugAdd
-
Methods inherited from interface io.quarkus.redis.datasource.RedisCommands
getDataSource
-
-
-
-
Constructor Detail
-
BlockingAutoSuggestCommandsImpl
public BlockingAutoSuggestCommandsImpl(RedisDataSource ds, ReactiveAutoSuggestCommands<K> reactive, Duration timeout)
-
-
Method Detail
-
ftSugAdd
public long ftSugAdd(K key, String string, double score, boolean increment)
Description copied from interface:AutoSuggestCommands
Execute the command FT.SUGADD. Summary: Add a suggestion string to an auto-complete suggestion dictionary Group: auto-suggest- Specified by:
ftSugAdd
in interfaceAutoSuggestCommands<K>
- Parameters:
key
- the suggestion dictionary keystring
- the suggestion string to indexscore
- the floating point number of the suggestion string's weightincrement
- increments the existing entry of the suggestion by the given score, instead of replacing the score. This is useful for updating the dictionary based on user queries in real time.- Returns:
- A uni emitting the current size of the suggestion dictionary.
-
ftSugDel
public boolean ftSugDel(K key, String string)
Description copied from interface:AutoSuggestCommands
Execute the command FT.SUGDEL. Summary: Delete a string from a suggestion index Group: auto-suggest- Specified by:
ftSugDel
in interfaceAutoSuggestCommands<K>
- Parameters:
key
- the suggestion dictionary keystring
- the suggestion string to index- Returns:
- A uni emitting
true
if the value was found,false
otherwise
-
ftSugGet
public List<Suggestion> ftSugGet(K key, String prefix)
Description copied from interface:AutoSuggestCommands
Execute the command FT.SUGGET. Summary: Get completion suggestions for a prefix Group: auto-suggest- Specified by:
ftSugGet
in interfaceAutoSuggestCommands<K>
- Parameters:
key
- the suggestion dictionary keyprefix
- is prefix to complete on.- Returns:
- A uni emitting a list of the top suggestions matching the prefix, optionally with score after each entry.
-
ftSugGet
public List<Suggestion> ftSugGet(K key, String prefix, GetArgs args)
Description copied from interface:AutoSuggestCommands
Execute the command FT.SUGGET. Summary: Get completion suggestions for a prefix Group: auto-suggest- Specified by:
ftSugGet
in interfaceAutoSuggestCommands<K>
- Parameters:
key
- the suggestion dictionary keyprefix
- is prefix to complete on.args
- the extra argument, must not benull
- Returns:
- A uni emitting
true
if the value was found,false
otherwise
-
ftSugLen
public long ftSugLen(K key)
Description copied from interface:AutoSuggestCommands
Execute the command FT.SUGLEN. Summary: Get the size of an auto-complete suggestion dictionary Group: auto-suggest- Specified by:
ftSugLen
in interfaceAutoSuggestCommands<K>
- Parameters:
key
- the suggestion dictionary key- Returns:
- A uni emitting the current size of the suggestion dictionary.
-
-