Created
March 22, 2017 18:43
-
-
Save pkmnfrk/746d021f075fe6af4bea1f6269303bf5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REDIS="redis-cli -n 1" | |
#echo Module version: | |
#$REDIS module list | |
#echo | |
echo Recreate index: | |
$REDIS FT.CREATE test SCHEMA body TEXT WEIGHT 1 | |
echo | |
echo Add data: | |
$REDIS FT.ADD test d1 1 FIELDS body "The rain in spain falls mainly in the plains" | |
$REDIS FT.ADD test d2 1 FIELDS body "Go and catch the train!" | |
$REDIS FT.ADD test d3 1 FIELDS body "This has nothing to do with the rest" | |
echo | |
echo Index stats: | |
$REDIS FT.INFO test | |
echo | |
echo Query: | |
$REDIS FT.SEARCH test rain | |
echo | |
echo Drop index: | |
$REDIS FT.DROP test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment