public class RediSearch
extends org.redisson.RedissonObject
| 构造器和说明 |
|---|
RediSearch(org.redisson.client.codec.Codec codec,
org.redisson.command.CommandAsyncExecutor commandExecutor,
String name) |
RediSearch(org.redisson.command.CommandAsyncExecutor commandExecutor,
String name) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
addAlias(String alias) |
org.redisson.api.RFuture<Boolean> |
addAliasAsync(String alias) |
int |
addDict(String dictName,
String... terms)
Adds terms to a dictionary.
|
org.redisson.api.RFuture<Integer> |
addDictAsync(String dictName,
String... terms) |
boolean |
addDocument(Document document)
Adds a document to the index.
|
boolean |
addDocument(Document document,
DocumentOptions options) |
org.redisson.api.RFuture<Boolean> |
addDocumentAsync(Document document,
DocumentOptions options) |
boolean |
addHash(String docId,
double score)
Adds a document to the index from an existing HASH key in Redis.
|
boolean |
addHash(String docId,
double score,
RSLanguage language) |
boolean |
addHash(String docId,
double score,
RSLanguage language,
boolean replace) |
org.redisson.api.RFuture<Boolean> |
addHashAsync(String docId,
double score,
RSLanguage language,
boolean replace) |
int |
addSuggestion(Suggestion suggestion)
Adds a suggestion string to an auto-complete suggestion dictionary.
|
int |
addSuggestion(Suggestion suggestion,
boolean increment) |
org.redisson.api.RFuture<Integer> |
addSuggestionAsync(Suggestion suggestion,
boolean increment) |
long |
addSynonym(String... terms)
Adds a synonym group.
|
org.redisson.api.RFuture<Long> |
addSynonymAsync(String... terms) |
AggregateResult |
aggregate(String query,
AggregateOptions aggregateOptions)
Runs a search query on an index, and performs aggregate transformations on the results.
|
org.redisson.api.RFuture<AggregateResult> |
aggregateAsync(String query,
AggregateOptions aggregateOptions) |
boolean |
alterIndex(Field... fields) |
org.redisson.api.RFuture<Boolean> |
alterIndexAsync(Field... fields) |
boolean |
createIndex(Schema schema)
Creates an index with the given spec
|
boolean |
createIndex(Schema schema,
IndexOptions indexOptions) |
org.redisson.api.RFuture<Boolean> |
createIndexAsync(Schema schema,
IndexOptions indexOptions) |
boolean |
deleteAlias(String alias) |
org.redisson.api.RFuture<Boolean> |
deleteAliasAsync(String alias) |
int |
deleteDict(String dictName,
String... terms)
Deletes terms from a dictionary.
|
org.redisson.api.RFuture<Integer> |
deleteDictAsync(String dictName,
String... terms) |
boolean |
deleteDocument(String docId)
Deletes a document from the index.
|
boolean |
deleteDocument(String docId,
boolean deleteDocument) |
org.redisson.api.RFuture<Boolean> |
deleteDocumentAsync(String docId,
boolean deleteDocument) |
boolean |
deleteSuggestion(String term)
Deletes a string from a suggestion index.
|
org.redisson.api.RFuture<Boolean> |
deleteSuggestionAsync(String term) |
boolean |
dropIndex()
Deletes all the keys associated with the index.
|
boolean |
dropIndex(boolean keepDocs) |
org.redisson.api.RFuture<Boolean> |
dropIndexAsync(boolean keepDocs) |
List<String> |
dumpDict(String dictName)
Dumps all terms in the given dictionary.
|
org.redisson.api.RFuture<List<String>> |
dumpDictAsync(String dictName) |
Map<String,List<Long>> |
dumpSynonyms()
Dumps the contents of a synonym group.
|
org.redisson.api.RFuture<Map<String,List<Long>>> |
dumpSynonymsAsync() |
String |
explain(String query) |
org.redisson.api.RFuture<String> |
explainAsync(String query) |
Map<String,String> |
getConfig(ConfigOption option) |
org.redisson.api.RFuture<Map<String,String>> |
getConfigAsync(ConfigOption option) |
Map<String,Object> |
getDocument(String docId)
Returns the full contents of a document.
|
org.redisson.api.RFuture<Map<String,Object>> |
getDocumentAsync(String docId) |
List<Map<String,Object>> |
getDocuments(String... docIds)
Returns the full contents of multiple documents.
|
org.redisson.api.RFuture<List<Map<String,Object>>> |
getDocumentsAsync(String... docIds) |
Map<String,String> |
getHelp(ConfigOption option) |
org.redisson.api.RFuture<Map<String,String>> |
getHelpAsync(ConfigOption option) |
List<Suggestion> |
getSuggestion(String prefix,
SuggestionOptions options)
Gets completion suggestions for a prefix.
|
org.redisson.api.RFuture<List<Suggestion>> |
getSuggestionAsync(String prefix,
SuggestionOptions options) |
int |
getSuggestionLength()
Gets the size of an auto-complete suggestion dictionary
|
org.redisson.api.RFuture<Integer> |
getSuggestionLengthAsync() |
List<String> |
getTagVals(String fieldName)
Returns the distinct tags indexed in a Tag field.
|
org.redisson.api.RFuture<List<String>> |
getTagValsAsync(String fieldName) |
List<String> |
listIndexes()
Returns a list of all existing indexes.
|
org.redisson.api.RFuture<List<String>> |
listIndexesAsync() |
Map<String,Object> |
loadIndex() |
org.redisson.api.RFuture<Map<String,Object>> |
loadIndexAsync() |
SearchResult |
search(String query,
SearchOptions searchOptions)
Searches the index with a textual query, returning either documents or just ids.
|
org.redisson.api.RFuture<SearchResult> |
searchAsync(String query,
SearchOptions searchOptions) |
boolean |
setConfig(ConfigOption option,
String value) |
org.redisson.api.RFuture<Boolean> |
setConfigAsync(ConfigOption option,
String value) |
List<MisspelledTerm> |
spellCheck(String query,
SpellCheckOptions options)
Performs spelling correction on a query, returning suggestions for misspelled terms.
|
org.redisson.api.RFuture<List<MisspelledTerm>> |
spellCheckAsync(String query,
SpellCheckOptions options) |
boolean |
updateAlias(String alias) |
org.redisson.api.RFuture<Boolean> |
updateAliasAsync(String alias) |
boolean |
updateSynonym(long synonymGroupId,
String... terms)
Updates a synonym group.
|
org.redisson.api.RFuture<Boolean> |
updateSynonymAsync(long synonymGroupId,
String... terms) |
addListener, addListener, addListenerAsync, addListenerAsync, addTrackingListener, addTrackingListenerAsync, copy, copyAsync, delete, deleteAsync, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getLockByMapKey, getLockByValue, getName, getRawName, getRawName, getServiceManager, getSubscribeService, isExists, isExistsAsync, map, migrate, migrateAsync, move, moveAsync, prefixName, removeListener, removeListener, removeListenerAsync, removeListenerAsync, removeListenerAsync, removeTrackingListener, removeTrackingListenerAsync, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, touchAsync, unlink, unlinkAsyncpublic RediSearch(org.redisson.client.codec.Codec codec,
org.redisson.command.CommandAsyncExecutor commandExecutor,
String name)
public RediSearch(org.redisson.command.CommandAsyncExecutor commandExecutor,
String name)
public boolean createIndex(Schema schema)
schema - public boolean createIndex(Schema schema, IndexOptions indexOptions)
public org.redisson.api.RFuture<Boolean> createIndexAsync(Schema schema, IndexOptions indexOptions)
public boolean alterIndex(Field... fields)
public boolean dropIndex()
public boolean dropIndex(boolean keepDocs)
public org.redisson.api.RFuture<Boolean> dropIndexAsync(boolean keepDocs)
public boolean addDocument(Document document)
document - public boolean addDocument(Document document, DocumentOptions options)
public org.redisson.api.RFuture<Boolean> addDocumentAsync(Document document, DocumentOptions options)
public Map<String,Object> getDocument(String docId)
docId - public List<Map<String,Object>> getDocuments(String... docIds)
docIds - public org.redisson.api.RFuture<List<Map<String,Object>>> getDocumentsAsync(String... docIds)
public boolean deleteDocument(String docId)
docId - public boolean deleteDocument(String docId, boolean deleteDocument)
public org.redisson.api.RFuture<Boolean> deleteDocumentAsync(String docId, boolean deleteDocument)
public boolean addHash(String docId, double score)
docId - score - public boolean addHash(String docId, double score, RSLanguage language)
public boolean addHash(String docId, double score, RSLanguage language, boolean replace)
public org.redisson.api.RFuture<Boolean> addHashAsync(String docId, double score, RSLanguage language, boolean replace)
public boolean addAlias(String alias)
public boolean updateAlias(String alias)
public boolean deleteAlias(String alias)
public boolean setConfig(ConfigOption option, String value)
public org.redisson.api.RFuture<Boolean> setConfigAsync(ConfigOption option, String value)
public Map<String,String> getConfig(ConfigOption option)
public org.redisson.api.RFuture<Map<String,String>> getConfigAsync(ConfigOption option)
public Map<String,String> getHelp(ConfigOption option)
public org.redisson.api.RFuture<Map<String,String>> getHelpAsync(ConfigOption option)
public int addDict(String dictName, String... terms)
dictName - terms - public org.redisson.api.RFuture<Integer> addDictAsync(String dictName, String... terms)
public int deleteDict(String dictName, String... terms)
dictName - terms - public org.redisson.api.RFuture<Integer> deleteDictAsync(String dictName, String... terms)
public List<String> dumpDict(String dictName)
dictName - public long addSynonym(String... terms)
terms - public boolean updateSynonym(long synonymGroupId,
String... terms)
synonymGroupId - terms - public org.redisson.api.RFuture<Boolean> updateSynonymAsync(long synonymGroupId, String... terms)
public Map<String,List<Long>> dumpSynonyms()
public List<String> getTagVals(String fieldName)
fieldName - public int addSuggestion(Suggestion suggestion)
suggestion - public int addSuggestion(Suggestion suggestion, boolean increment)
public org.redisson.api.RFuture<Integer> addSuggestionAsync(Suggestion suggestion, boolean increment)
public int getSuggestionLength()
public org.redisson.api.RFuture<Integer> getSuggestionLengthAsync()
public boolean deleteSuggestion(String term)
term - public List<Suggestion> getSuggestion(String prefix, SuggestionOptions options)
prefix - options - public org.redisson.api.RFuture<List<Suggestion>> getSuggestionAsync(String prefix, SuggestionOptions options)
public SearchResult search(String query, SearchOptions searchOptions)
query - searchOptions - public org.redisson.api.RFuture<SearchResult> searchAsync(String query, SearchOptions searchOptions)
public AggregateResult aggregate(String query, AggregateOptions aggregateOptions)
query - aggregateOptions - public org.redisson.api.RFuture<AggregateResult> aggregateAsync(String query, AggregateOptions aggregateOptions)
public List<MisspelledTerm> spellCheck(String query, SpellCheckOptions options)
query - options - public org.redisson.api.RFuture<List<MisspelledTerm>> spellCheckAsync(String query, SpellCheckOptions options)
Copyright © 2024. All rights reserved.