1 2# Quick Start Guide for RediSearch 3 4Learn about RediSearch using this [Getting Started Tutorial](https://github.com/RediSearch/redisearch-getting-started). This tutorial will guide you throught various examples including an application that uses RediSearch Java, Python and Node.js clients. 5 6 7## Redis Cloud 8 9RediSearch is available on all Redis Cloud managed services. Redis Cloud Essentials offers a completely free managed database up to 30MB. 10 11[Get started here](https://redis.com/try-free/) 12 13## Running with Docker 14 15```sh 16docker run -p 6379:6379 redislabs/redisearch:latest 17``` 18 19## Download and running binaries 20 21First download the pre-compiled version from the [Redis download center](https://redis.com/download-center/modules/). 22 23Next, run Redis with RediSearch: 24 25```sh 26$ redis-server --loadmodule /path/to/module/src/redisearch.so 27``` 28 29## Building and running from source 30 31First, clone the git repo (make sure not to omit the `--recursive` option, to properly clone submodules): 32 33```sh 34git clone --recursive https://github.com/RediSearch/RediSearch.git 35cd RediSearch 36``` 37 38Next, install dependencies: 39 40On macOS: 41```sh 42make setup 43``` 44 45On Linux: 46```sh 47sudo make setup 48``` 49 50Next, build: 51```sh 52make build 53``` 54 55Finally, run Redis with RediSearch: 56```sh 57make run 58``` 59 60For more elaborate build instructions, see the [Development page](Development.md). 61 62## Creating an index with fields and weights (default weight is 1.0) 63 64``` 65127.0.0.1:6379> FT.CREATE myIdx ON HASH PREFIX 1 doc: SCHEMA title TEXT WEIGHT 5.0 body TEXT url TEXT 66OK 67 68``` 69 70## Adding documents to the index 71``` 72127.0.0.1:6379> hset doc:1 title "hello world" body "lorem ipsum" url "http://redis.io" 73(integer) 3 74``` 75 76## Searching the index 77 78``` 79127.0.0.1:6379> FT.SEARCH myIdx "hello world" LIMIT 0 10 801) (integer) 1 812) "doc:1" 823) 1) "title" 83 2) "hello world" 84 3) "body" 85 4) "lorem ipsum" 86 5) "url" 87 6) "http://redis.io" 88``` 89 90!!! note 91 Input is expected to be valid utf-8 or ASCII. The engine cannot handle wide character unicode at the moment. 92 93 94## Dropping the index 95 96``` 97127.0.0.1:6379> FT.DROPINDEX myIdx 98OK 99``` 100 101## Adding and getting Auto-complete suggestions 102 103``` 104127.0.0.1:6379> FT.SUGADD autocomplete "hello world" 100 105OK 106 107127.0.0.1:6379> FT.SUGGET autocomplete "he" 1081) "hello world" 109 110``` 111