Code Monkey home page Code Monkey logo

lettusearch'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).

lettusearch's People

Contributors

dependabot-preview[bot] avatar gkorland avatar jruaux avatar lpellegr avatar

Stargazers

 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

lettusearch's Issues

Not valid CommandArgs query for Russian text search

Hello, Im Aleksey
Im start use library and find interesting "bug"
When im try search like this (Im use kotlin)

val result = redis.rediSearchReactiveCommands.search(
indexName,
filters.joinToString(" "),
SearchOptions.builder()
.language(Language.Russian.name.toLowerCase())
.limit(Limit.builder()
.num(pageable.pageSize.toLong())
.offset(pageable.offset)
.build())
.returnFields(RETURN_CACHE_FIELDS)
.build())
.awaitFirst()

Filters contains search with Russian chars

Im use UTF-8 Codec for init
RediSearchClient.create(lettuceConnectionFactory.clientResources, redisURI)
.connect(StringCodec.UTF8!!, redisURI).reactive()

So when query go to RediSearch query string come "not valid" and redis return empty results

Im do some debug and find place in RediSearchCommandBuilder
method - public Command<K, V, SearchResults<K, V>> search(String index, String query, SearchOptions options)

code line with bug - RediSearchCommandArgs<K, V> commandArgs = createArgs(index);
commandArgs.add(query);

when call - commandArgs.add(query);
its just decode without CODEC which use in init and go to not valid for redisearch

I think this line must call - commandArgs.addKey(query);
Im do my custom copy paste code from this and its work fine!
Because commandArgs.addKey(query); decode value string with Codec!

Can you fix this or say why Russian query not correct work with this library?
Im can do PR for this or you fix it itself?)

Ty its very need for me

IllegalArgumentException when used sentinel

I got IllegalArgumentException when used sentinel.
Caused by: java.lang.IllegalArgumentException: hostname can't be null
at java.net.InetSocketAddress.checkHost(InetSocketAddress.java:149) ~[?:?]
at java.net.InetSocketAddress.createUnresolved(InetSocketAddress.java:254) ~[?:?]
at io.lettuce.core.resource.SocketAddressResolver.resolve(SocketAddressResolver.java:91) ~[lettuce-core-5.1.8.RELEASE.jar:?]
at io.lettuce.core.resource.SocketAddressResolver.resolve(SocketAddressResolver.java:71) ~[lettuce-core-5.1.8.RELEASE.jar:?]
at com.redislabs.lettusearch.RediSearchClient.lambda$getSocketAddress$6(RediSearchClient.java:229) ~[lettusearch-1.5.3.jar:?]
at reactor.core.publisher.MonoCallable.subscribe(MonoCallable.java:56) ~[reactor-core-3.2.11.RELEASE.jar:3.2.11.RELEASE]
at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[reactor-core-3.2.11.RELEASE.jar:3.2.11.RELEASE]
at reactor.core.publisher.MonoPeek.subscribe(MonoPeek.java:71) ~[reactor-core-3.2.11.RELEASE.jar:3.2.11.RELEASE]
at reactor.core.publisher.MonoPeek.subscribe(MonoPeek.java:71) ~[reactor-core-3.2.11.RELEASE.jar:3.2.11.RELEASE]
at reactor.core.publisher.MonoPeek.subscribe(MonoPeek.java:71) ~[reactor-core-3.2.11.RELEASE.jar:3.2.11.RELEASE]
at reactor.core.publisher.Mono.subscribe(Mono.java:3852) ~[reactor-core-3.2.11.RELEASE.jar:3.2.11.RELEASE]
at reactor.core.publisher.Mono.subscribeWith(Mono.java:3958) ~[reactor-core-3.2.11.RELEASE.jar:3.2.11.RELEASE]
at reactor.core.publisher.Mono.subscribe(Mono.java:3846) ~[reactor-core-3.2.11.RELEASE.jar:3.2.11.RELEASE]
at reactor.core.publisher.Mono.subscribe(Mono.java:3813) ~[reactor-core-3.2.11.RELEASE.jar:3.2.11.RELEASE]
at reactor.core.publisher.Mono.subscribe(Mono.java:3785) ~[reactor-core-3.2.11.RELEASE.jar:3.2.11.RELEASE]
at io.lettuce.core.AbstractRedisClient.initializeChannelAsync(AbstractRedisClient.java:290) ~[lettuce-core-5.1.8.RELEASE.jar:?]
at com.redislabs.lettusearch.RediSearchClient.connectStatefulAsync(RediSearchClient.java:177) ~[lettusearch-1.5.3.jar:?]
at com.redislabs.lettusearch.RediSearchClient.connectStandaloneAsync(RediSearchClient.java:134) ~[lettusearch-1.5.3.jar:?]
at com.redislabs.lettusearch.RediSearchClient.connect(RediSearchClient.java:93) ~[lettusearch-1.5.3.jar:?]
at com.redislabs.lettusearch.RediSearchClient.connect(RediSearchClient.java:86) ~[lettusearch-1.5.3.jar:?]

DocumentBuillder requires String payload

with this commit : 02f72ad you removed the functionality of the K,V payload generics on the document. Any objections to changing the DocumentBuilder.fields and field() to take a K,V rather than String, String?

Empty AggregateResults if at least one ToList reducer is empty

Steps for reproduce:
FT.CREATE idx ON HASH PREFIX 1 my_prefix: SCHEMA category TAG SORTABLE color TAG SORTABLE size TAG SORTABLE
FT.AGGREGATE idx @color:{red|blue} GROUPBY 1 @category REDUCE TOLIST 1 @color AS color REDUCE TOLIST 1 @size AS size

Bug condition: if the search request @color:{red|blue} returns no data for ToList reducer for size field then lettusearch api return empty AggregateResults (but getCount() method return value > 0);

Expected behavior: return empty list for empty ToList reducer.

Redis cli response for above query:

1) (integer) 1
2) 1) "category"
   2) "31"
   3) "color"
   4) 1) "red"
   5) "size"
   6) (empty list or set)
lettuSearchConnection.aggregate("idx", "@color:{red|blue}",
                com.redislabs.lettusearch.AggregateOptions.builder()
                        .groupBy(List.of("category"), com.redislabs.lettusearch.AggregateOptions.Operation.GroupBy.Reducer
                                        .ToList.builder().property("color").as("color").build(),
                                com.redislabs.lettusearch.AggregateOptions.Operation.GroupBy.Reducer
                                        .ToList.builder().property("size").as("size").build()
                        ).build()
        ).subscribe(ar -> {
            long count = ar.getCount(); <<<  count = 1
            Map<String, Object> map = ar.get(0);  <<< java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
        });

Redis server 6.2.3
Redisearch 2.0.9
Lettusearch 3.1.2

add support for LOAD *

Add support for LOAD * which loads all fields on FT.AGGREGATE whit and AggregateOptions.builder().loads()

SearchOptions without inKeys, inFields and returnFields results in Nullpointer exception.

SearchOptions without inKeys, inFields and returnFields results in Nullpointer exception.

if (!this.inKeys.isEmpty()) , if (!this.inFields.isEmpty()) and if (!this.returnFields.isEmpty()) in SearchOptions.java file will result nullpointer exception if fields are null.

Fix:
if (this.inKeys != null && !this.inKeys.isEmpty())
if (this.inFields != null && !this.inFields.isEmpty())
if (this.returnFields != null && !this.returnFields.isEmpty())

AGGREGATE filter not respecting codec

Recently, Redisearch added contains filters on aggregate queries, e.g.:
FT.AGGREGATE idx * FILTER "contains(@name, 'åæø')"

However, when using aggregate queries with lettusearch, it seems that the StringCodec is not respected unlike when using a select string.

More specifically, the filter string will be added with RediSearchCommandArgs::add, whereas the values of select strings are added with RediSearchCommandArgs::addValue. The former does not seem to respect the StringCodec used. As such, the query I gave above is not possible with lettusearch as far as I can tell since UTF-8 is used.

NLP when using sugget method

When using two argument sugget method

List<Suggestion<V>> sugget(K key, V prefix); instead of
List<Suggestion<V>> sugget(K key, V prefix, SuggetOptions options);

Default SuggetOptions is not passed, which results in NLP

Copied lettuce classes are problematic -nan ft.info

Various lettuce core classes are copied into this library (with same name and package). This seems problematic. I was debugging why ftInfo throws a NumberFormatException and it appears that the copy of LettuceStrings in this package has been modified to deal with it, but, the version of LettuceStrings actually being used (by random classpath ordering) is that from the lettuce package which does not have this condition:

        if ("-nan".equals(s)) {
            return Double.NaN;
        }

ft.info snippet with -nan

44)  1) "bytes_collected"
     2) "0"
     3) "total_ms_run"
     4) "0"
     5) "total_cycles"
     6) "0"
     7) "avarage_cycle_time_ms"
     8) "-nan"
     9) "last_run_time_ms"
    10) "0"
    11) "gc_numeric_trees_missed"
    12) "0"
    13) "gc_blocks_denied"
    14) "0"

Exception:


java.lang.NumberFormatException: For input string: "-nan"
	at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054) ~[na:na]
	at java.base/jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110) ~[na:na]
	at java.base/java.lang.Double.parseDouble(Double.java:543) ~[na:na]
	at io.lettuce.core.internal.LettuceStrings.toDouble(LettuceStrings.java:97) ~[lettuce-core-6.0.0.RELEASE.jar:6.0.0.RELEASE]
	at io.lettuce.core.protocol.RedisStateMachine.readFloat(RedisStateMachine.java:627) ~[lettuce-core-6.0.0.RELEASE.jar:6.0.0.RELEASE]
	at io.lettuce.core.protocol.RedisStateMachine.handleFloat(RedisStateMachine.java:425) ~[lettuce-core-6.0.0.RELEASE.jar:6.0.0.RELEASE]
	at io.lettuce.core.protocol.RedisStateMachine$State$Type.handle(RedisStateMachine.java:206) ~[lettuce-core-6.0.0.RELEASE.jar:6.0.0.RELEASE]
	at io.lettuce.core.protocol.RedisStateMachine.doDecode(RedisStateMachine.java:334) ~[lettuce-core-6.0.0.RELEASE.jar:6.0.0.RELEASE]
	at io.lettuce.core.protocol.RedisStateMachine.decode(RedisStateMachine.java:295) ~[lettuce-core-6.0.0.RELEASE.jar:6.0.0.RELEASE]
	at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:799) ~[lettuce-core-6.0.0.RELEASE.jar:6.0.0.RELEASE]
	at io.lettuce.core.protocol.CommandHandler.decode0(CommandHandler.java:750) ~[lettuce-core-6.0.0.RELEASE.jar:6.0.0.RELEASE]
	at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:724) ~[lettuce-core-6.0.0.RELEASE.jar:6.0.0.RELEASE]
	at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:618) ~[lettuce-core-6.0.0.RELEASE.jar:6.0.0.RELEASE]
	at io.lettuce.core.protocol.CommandHandler.channelRead(CommandHandler.java:560) ~[lettuce-core-6.0.0.RELEASE.jar:6.0.0.RELEASE]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.52.Final.jar:4.1.52.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.52.Final.jar:4.1.52.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.52.Final.jar:4.1.52.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.52.Final.jar:4.1.52.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.52.Final.jar:4.1.52.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.52.Final.jar:4.1.52.Final]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.52.Final.jar:4.1.52.Final]
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) ~[netty-transport-4.1.52.Final.jar:4.1.52.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714) ~[netty-transport-4.1.52.Final.jar:4.1.52.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650) ~[netty-transport-4.1.52.Final.jar:4.1.52.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) ~[netty-transport-4.1.52.Final.jar:4.1.52.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) ~[netty-transport-4.1.52.Final.jar:4.1.52.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[netty-common-4.1.52.Final.jar:4.1.52.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.52.Final.jar:4.1.52.Final]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.52.Final.jar:4.1.52.Final]
	at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]

SortBy with multi-fields allowed but not supported

While using this client library, I noticed that you can create a FT.SEARCH query with a multi-fields SORTBY with no errors whereas the backend does not support it.

Here is an example:

 final SearchResults<String, String> searchResult = connection.sync().search(
                "post", queryString,
                SearchOptions.builder()
                        .limit(Limit.builder().num(limit).build())
                        .sortBy(SortBy.builder()
                                .field("pinned").direction(Direction.Descending)
                                .field("publicationTime").direction(Direction.Descending)
                                .field("updateTime").direction(Direction.Descending).build()).build());

It seems that only the last SortBy field is considered.

There is maybe a reason I am not aware of, but as a user, I was expecting a compilation error or at least an error at runtime.

ToList reducer is not returning results as expected.

When running below query in redis cli:
FT.AGGREGATE <index_name>* GROUPBY 1 @field REDUCE TOLIST 1 @field1 as list REDUCE COUNT 0 as count
Result:

  1. (integer) 1
  2. 1)"field"
    2)"value"
  3. "list"
  4. 1)"field1_value1"
    2)"field1_value2"
  5. "count"
  6. "5"

But when we run through lettusearch :
Result: (AggregateResults)
{
"field": "value",
"list": "field1_value1"
"field1_value2": "count"
}
It should be:
{
"field": "value",
"list": "field1_value1","field1_value2"
"count": 5
}

How to get the number of documents in the resultset ?

In our project, we use search as follows:

val result = redis.searchReactiveCommands.search(
                indexName,
                filters.joinToString(" "),
                SearchOptions.builder()
                        .language(RUSSIAN_LANG)
                        .limit(Limit.builder()
                                .num(pageable.pageSize.toLong())
                                .offset(pageable.offset)
                                .build())
                        .returnFields(RETURN_CACHE_FIELDS)
                        .build())
                .awaitFirst()

result.count() will be equal to pageable.pageSize.
I am interested in how to get the number of documents in the resultset?

For example, a similar command in the console

127.0.0.1:6379> FT.SEARCH SAMPLE_INDEX "(@name|tagsLower:test*)" LIMIT 0 10
 1) (integer) 1000
 2) "2000"
 3)  1) "name"
     2) "Test"
     3) "nameLower"
     4) "test"

Resultset size is returned along with the search results - 1) (integer) 1000
How to get this parameter using the lettusearch library?

How to search with filters and by document id?

Hi, I want to use INKEYS parameter to restrict RediSearch results by a document ID.

Example in redis-cli:
FT.SEARCH SAMPLE_INDEX "(@channels:{test})" INKEYS 1 4

Is there any way to search like that with lettusearch? I don't see that it is possible to specify this parameter in com.redislabs.lettusearch.search.SearchOptions

ftMget jackson issue

I try to perform multiget like so:
Mono<List<Map<String, String>>> res = conn.ftMget("my_index", "my_index:C6009e1aa52dea00b0f320c46da7a99a9", "my_index:C632be3ebf9bf590272f36e7e8b65d005");

Index is valid as are the doc ids. The exception is:

Type definition error: [collection type; class java.util.List, contains [map type; class java.util.Map, [simple type, class java.lang.String] -> [simple type, class java.lang.String]]]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Incompatible types: declared root type ([collection type; class java.util.List, contains [map type; class java.util.Map, [simple type, class java.lang.String] -> [simple type, class java.lang.String]]]) vs java.util.LinkedHashMap

It looks like a deserialization issue

ERR unknown command `FT.CREATE`

while creating an index getting error

ERR unknown command FT.CREATE

redis-cli --cluster call 127.0.0.1:30001 FT.CREATE myIdx SCHEMA title TEXT WEIGHT 5.0 body TEXT url TEXT value NUMERIC

i tried to install the redis search module using below command, but no success.
redis-cli --cluster call 127.0.0.1:30001 MODULE load redisearch.so OPT1 OPT2

SearchOptions with noContent set as true returns array of empty objects.

SearchOptions with noContent set as true returns array of empty objects.

But as per redis documentation it should return list of document ids.
NOCONTENT : If it appears after the query, we only return the document ids and not the content. This is useful if RediSearch is only an index on an external document collection

Reduce strings creation

It seems like there are many Strings created throughout the code that can be avoided

e.g. the following creates a new String even when log level is not set to Debug

logger.debug("Trying to get a Redis connection for: " + redisURI);

Should better used like this:
.doOnNext(addr -> logger.debug("Resolved SocketAddress {} using {}", addr, redisURI));

Connecting to a sentinel Redis 5.0.7 fails with `NOAUTH Authentication required`

I am trying to connect to the sentinel node of a Redis and I am getting the error:

Caused by: io.lettuce.core.RedisConnectionException: null
	at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:75) ~[lettuce-core-5.3.3.RELEASE.jar:5.3.3.RELEASE]
	at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:56) ~[lettuce-core-5.3.3.RELEASE.jar:5.3.3.RELEASE]
	at io.lettuce.core.AbstractRedisClient.getConnection(AbstractRedisClient.java:242) ~[lettuce-core-5.3.3.RELEASE.jar:5.3.3.RELEASE]
	at com.redislabs.lettusearch.RediSearchClient.connect(RediSearchClient.java:101) ~[lettusearch-2.3.2.jar:na]
	at com.redislabs.lettusearch.RediSearchClient.connect(RediSearchClient.java:94) ~[lettusearch-2.3.2.jar:na]
	at ru.vtb.payments.catalog.config.datasouce.RedisConfig.rediSearchReactiveCommands(RedisConfig.kt:27) ~[main/:na]
	at ru.vtb.payments.catalog.config.datasouce.RedisConfig$$EnhancerBySpringCGLIB$$7f1572ea.CGLIB$rediSearchReactiveCommands$1(<generated>) ~[main/:na]
	at ru.vtb.payments.catalog.config.datasouce.RedisConfig$$EnhancerBySpringCGLIB$$7f1572ea$$FastClassBySpringCGLIB$$173fceee.invoke(<generated>) ~[main/:na]
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.2.7.RELEASE.jar:5.2.7.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[spring-context-5.2.7.RELEASE.jar:5.2.7.RELEASE]
	at ru.vtb.payments.catalog.config.datasouce.RedisConfig$$EnhancerBySpringCGLIB$$7f1572ea.rediSearchReactiveCommands(<generated>) ~[main/:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:564) ~[na:na]
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.7.RELEASE.jar:5.2.7.RELEASE]
	... 82 common frames omitted
Caused by: io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required.  
	at io.lettuce.core.ExceptionFactory.createExecutionException(ExceptionFactory.java:135) ~[lettuce-core-5.3.3.RELEASE.jar:5.3.3.RELEASE]
	at io.lettuce.core.ExceptionFactory.createExecutionException(ExceptionFactory.java:108) ~[lettuce-core-5.3.3.RELEASE.jar:5.3.3.RELEASE]
	at io.lettuce.core.RedisPublisher$SubscriptionCommand.complete(RedisPublisher.java:764) ~[lettuce-core-5.3.3.RELEASE.jar:5.3.3.RELEASE]

docker-compose.yml to launch redis containers:

version: '2'

networks:
  app-tier:
    driver: bridge

services:
  redis:
    image: 'redislabs/redisearch:latest'
    environment:
      - REDIS_PASSWORD=12345678
    ports:
      - '6379:6379'
    networks:
      - app-tier
  redis-sentinel:
    image: 'bitnami/redis-sentinel:latest'
    environment:
      - REDIS_MASTER_HOST=127.0.0.1
      - REDIS_MASTER_PASSWORD=12345678
      - REDIS_SENTINEL_PASSWORD=12345678
    ports:
      - '26379:26379'
    networks:
      - app-tier

The settings in the spring-boot app to connect Redis:

  redis:
    port: 6379
    database: 0
    host: localhost
    mutex-timeout: 300s
    command-timeout: 10s
    sentinel:
      master: mymaster
      nodes: 127.0.0.1:26379
      password: 12345678
    password: 12345678

I see that the redisURI in the RediSearchClient is formed correctly
image

I also see a connection that is formed in the RediSearchClient, it does not contain a password, what is this password?
I tried to set it in debug, but the authentication error remained.
image

The password to Redis is correct:
image
I checked that the password to Redis is correct and also when I configure sentinel Redis without password there are no connection errors.

I see similar issues:

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.