Giter Club home page Giter Club logo

redisearch-getting-started's Introduction

Dockerhub Codecov Forum Discord

Latest Release

Latest 2.6

RediSearch

Querying, secondary indexing, and full-text search for Redis

Overview

RediSearch is a Redis module that provides querying, secondary indexing, and full-text search for Redis. To use RediSearch, you first declare indexes on your Redis data. You can then use the RediSearch query language to query that data.

RediSearch uses compressed, inverted indexes for fast indexing with a low memory footprint.

RediSearch indexes enhance Redis by providing exact-phrase matching, fuzzy search, and numeric filtering, among many other features.

Getting started

If you're just getting started with RediSearch, check out the official RediSearch tutorial. Also, consider viewing our RediSearch video explainer.

The fastest way to get up and running with RediSearch is by using the Redis Stack Docker image.

How do I Redis?

Learn for free at Redis University

Build faster with the Redis Launchpad

Try the Redis Cloud

Dive in developer tutorials

Join the Redis community

Work at Redis

Trying RediSearch

To try RediSearch, either use the RediSearch Docker image, or create a free Redis Cloud Essentials account to get a RediSearch instance in the cloud.

Docker image

The Redis Stack Docker image makes it easy to try RediSearch.

To create a local RediSearch container, run:

$ docker run -p 6379:6379 redis/redis-stack-server:latest

To connect to this instance, run:

$ redis-cli

Documentation

The RediSearch documentation provides a complete overview of RediSearch. Helpful sections include:

Mailing list and forum

Got questions? Join us in #redisearch on the Redis Discord server.

If you have a more detailed question, drop us a line on the RediSearch Discussion Forum.

Client libraries

Official clients

NRedisStack Jedis node-redis redis-py
Redis.OM Redis OM Spring redis-om-node redis-om

Community-maintained clients

Project Language License Author Stars
redisson Java MIT Redisson Stars
redisearch-go Go BSD Redis redisearch-go-stars
rueidis Go Apache 2.0 Rueian rueidis-stars
redisearch-php PHP MIT Ethan Hann redisearch-php-stars
php-redisearch PHP MIT MacFJA php-redisearch-stars
redisearch-api-rs Rust BSD Redis redisearch-api-rs-stars
redi_search_rails Ruby MIT Dmitry Polyakovsky redi_search_rails-stars
redisearch-rb Ruby MIT Victor Ruiz redisearch-rb-stars
redi_search Ruby MIT Nick Pezza redi_search-stars
coredis Python MIT Ali-Akber Saifee coredis-stars

RediSearch features

  • Full-Text indexing of multiple fields in Redis hashes
  • Incremental indexing without performance loss
  • Document ranking (using tf-idf, with optional user-provided weights)
  • Field weighting
  • Complex boolean queries with AND, OR, and NOT operators
  • Prefix matching, fuzzy matching, and exact-phrase queries
  • Support for double-metaphone phonetic matching
  • Auto-complete suggestions (with fuzzy prefix suggestions)
  • Stemming-based query expansion in many languages (using Snowball)
  • Support for Chinese-language tokenization and querying (using Friso)
  • Numeric filters and ranges
  • Geospatial searches using Redis geospatial indexing
  • A powerful aggregations engine
  • Supports for all utf-8 encoded text
  • Retrieve full documents, selected fields, or only the document IDs
  • Sorting results (for example, by creation date)

Cluster support

RediSearch has a distributed cluster version that scales to billions of documents across hundreds of servers. At the moment, distributed RediSearch is available as part of Redis Cloud and Redis Enterprise Software.

See RediSearch on Redis Enterprise for more information.

License

RediSearch is licensed under the Redis Source Available License 2.0 (RSALv2) or the Server Side Public License v1 (SSPLv1).

redisearch-getting-started's People

Contributors

chayim avatar dependabot[bot] avatar gkorland avatar imichaelowolabi avatar jphaugla avatar k-jo avatar simonprickett avatar snyk-bot avatar tgrall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

redisearch-getting-started's Issues

Docker compose throws the following error

Hi,
I'm trying to run the Docker but it throws the following error. I'm on Mac.


> [email protected] postinstall /app/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> [email protected] postinstall /app/node_modules/ejs
> node ./postinstall.js

Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)


> [email protected] postinstall /app/node_modules/bootstrap-vue
> opencollective || exit 0

                                                             
                          ;iiiiiiiiiiSSSSSSSSiiiiiiiiii;     
                          .rXXXXXXXXXrrrrrrrSXXXXXXXXXr.     
                          :iXXXXXXXX2. ;;;;, r3XXXXXXXi;     
                         ,rSSSSSXXXX2..sSSi: r3XXXSSSSSr,    
                          ,siiiiS2XX2. :;;:,.rXX2Siiiis,     
                           ,riiiii2X2..5XXXi .22iiiiir,      
                            .riiiii22..::::,,r2iiiiir.       
                             .riiiii5SSiiiiS22iiiiir.        
                               ;iiiii5X3333X5iiiii;          
                                :iiiiiSXXXXSiiiii:           
                                 :siiiiSXXSiiiis:            
                                  ,siiiiiiiiiis,             
                                   .riiiiiiiir.              
                                    .riiiiiir.               
                                     .;iiii;.                
                                       ;ii;                  
                                        ::                   
                                         
                       Thanks for installing bootstrap-vue 
                 Please consider donating to our open collective
                        to help us maintain this package.
                                         
                           Number of contributors: 257
                              Number of backers: 161
                              Annual budget: $8,874
                             Current balance: $6,364
                                         
              Donate: https://opencollective.com/bootstrap-vue/donate
                                         
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/webpack-dev-server/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/watchpack-chokidar2/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 1309 packages from 963 contributors and audited 1315 packages in 31.619s

56 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Removing intermediate container 51972a14e2fa
 ---> 047c1bb2bb2a
Step 12/15 : COPY . .
 ---> c4c68447c526
Step 13/15 : RUN npm run build
 ---> Running in 557f2715c149

> [email protected] build /app
> vue-cli-service build


-  Building for production...
 ERROR  Failed to compile with 3 errors9:25:23 AM

These relative modules were not found:

* ./../lib/SearchClient in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/Search.vue?vue&type=script&lang=js&, ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/FacetedSearch.vue?vue&type=script&lang=js&
* ./lib/search-samples.json in ./src/main.js
 ERROR  Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `vue-cli-service build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-09-18T09_25_23_558Z-debug.log
ERROR: Service 'search-frontend' failed to build: The command '/bin/sh -c npm run build' returned a non-zero code: 1

creating the idx:theater index fails on the location column

creating index as documented fails on the location column for idx:theater. Everything else seems to work:

1:C 14 Mar 2022 15:53:14.592 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 14 Mar 2022 15:53:14.592 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 14 Mar 2022 15:53:14.592 # Configuration loaded
1:M 14 Mar 2022 15:53:14.592 * monotonic clock: POSIX clock_gettime
1:M 14 Mar 2022 15:53:14.594 * Running mode=standalone, port=6379.
1:M 14 Mar 2022 15:53:14.594 # Server initialized
1:M 14 Mar 2022 15:53:14.597 * Redis version found by RedisAI: 6.2.6 - oss
1:M 14 Mar 2022 15:53:14.597 * RedisAI version 10205, git_sha=746b199e69f272d12aab00c26d31c8e35eb48b29
1:M 14 Mar 2022 15:53:14.597 * Module 'ai' loaded from /usr/lib/redis/modules/redisai.so
1:M 14 Mar 2022 15:53:14.609 * Redis version found by RedisSearch : 6.2.6 - oss
1:M 14 Mar 2022 15:53:14.609 * RediSearch version 2.2.5 (Git=v1.99.5-386-g93a916c4)
1:M 14 Mar 2022 15:53:14.609 * Low level api version 1 initialized successfully
1:M 14 Mar 2022 15:53:14.610 * concurrent writes: OFF, gc: ON, prefix min length: 2, prefix max expansions: 200, query timeout (ms): 500, timeout policy: return, cursor read size: 1000, cursor max idle (ms): 300000, max doctable size: 1000000, max number of search results: 1000000, search pool size: 20, index pool size: 8,
1:M 14 Mar 2022 15:53:14.611 * Initialized thread pool!
1:M 14 Mar 2022 15:53:14.611 * Enabled diskless replication
1:M 14 Mar 2022 15:53:14.611 * Module 'search' loaded from /usr/lib/redis/modules/redisearch.so
1:M 14 Mar 2022 15:53:14.631 * Starting up RedisGraph version 2.4.11.
1:M 14 Mar 2022 15:53:14.633 * Thread pool created, using 6 threads.
1:M 14 Mar 2022 15:53:14.633 * Maximum number of OpenMP threads set to 6
1:M 14 Mar 2022 15:53:14.633 * Module 'graph' loaded from /usr/lib/redis/modules/redisgraph.so
1:M 14 Mar 2022 15:53:14.645 * RedisTimeSeries version 10608, git_sha=5e7caf18e4e08b68a0585d63f965ce3dafcbe331
1:M 14 Mar 2022 15:53:14.645 * Redis version found by RedisTimeSeries : 6.2.6 - oss
1:M 14 Mar 2022 15:53:14.645 * loaded default CHUNK_SIZE_BYTES policy: 4096
1:M 14 Mar 2022 15:53:14.645 * loaded server DUPLICATE_POLICY: block
1:M 14 Mar 2022 15:53:14.645 * Setting default series ENCODING to: compressed
1:M 14 Mar 2022 15:53:14.645 * Detected redis oss
1:M 14 Mar 2022 15:53:14.646 * Enabled diskless replication
1:M 14 Mar 2022 15:53:14.646 * Module 'timeseries' loaded from /usr/lib/redis/modules/redistimeseries.so
1:M 14 Mar 2022 15:53:14.653 * version: 20006 git sha: db3329c branch: heads/v2.0.6
1:M 14 Mar 2022 15:53:14.653 * Exported RedisJSON_V1 API
1:M 14 Mar 2022 15:53:14.653 * Enabled diskless replication
1:M 14 Mar 2022 15:53:14.653 * Created new data type 'ReJSON-RL'
1:M 14 Mar 2022 15:53:14.653 * Module 'ReJSON' loaded from /usr/lib/redis/modules/rejson.so
1:M 14 Mar 2022 15:53:14.653 * Acquired RedisJSON_V1 API

Integration with Spring boot

Hi I have a question I am having a POJO Example:

@DaTa
@AllArgsConstructor
@NoArgsConstructor
@builder
@RedisHash("User")
public class UserEntity {
@id
private UUID id;

private String userName;
@Indexed
private String email;

}

Question 1:
Can I create a searchIndex with a pojo class declared above, if so is there an annotation?

Question 2:
In order to create fields in I have to do searchConnection.sync().create(searchIndexName, ....fields);
what if I want to give fields as dynamic i.e. user input fields does .create take list of feilds?

Please remove all movies with Dashes (e.g. X-Men, Spider-Man) ...

... because Redisearch is not able to handle this (this way)

You can not retrieve these movies by there title:

127.0.0.1:x> FT.SEARCH idx:movie "x-men"
1) (integer) 0
127.0.0.1:x> FT.SEARCH idx:movie "x\-men"
1) (integer) 0
127.0.0.1:x> FT.SEARCH idx:movie "x\\-men"
1) (integer) 0

RediSearch/RediSearch#478

A design bug not fixed for more than 5 years :-/

(So sad when you only spend two hours reviewing this promising project and then realize that no one must have used it productively or built themselves crazy workarounds, very disappointing)

Computed Search

Hi there,
Consider I have a schema for my products as follows:
[{ "Name":"p1", "Price":10000, "Discount":0.5 }, { "Name":"p2", "Price":20000, "Discount":0.3 }]

I want to find products whose price after discount is less than 7000.
like the following predicate:
p=>p.Price*(1-p.Discount)<7000

How can I write this query in redissearch?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.