HSET doc:1 title "Redis Introduction" content "Redis is an open source in-memory data structure server, it can be used as a database, cache and message broker."
HSET doc:2 title "Redis Data Types" content "Redis supports different kinds of data types such as strings, hashes, lists, sets, sorted sets, bitmaps, hyperloglogs and geospatial indexes."
复制代码
大概使用FT.ADD命令:
FT.ADD idx:myindex doc1 1.0 FIELDS title "Redis Introduction" content "Redis is an open source in-memory data structure server, it can be used as a database, cache and message broker."
FT.ADD idx:myindex doc2 1.0 FIELDS title "Redis Data Types" content "Redis supports different kinds of data types such as strings, hashes, lists, sets, sorted sets, bitmaps, hyperloglogs and geospatial indexes."