Reputation: 23
When I try to get some data from redis using the redisearch command; ft.search index:something *
I only get a small portion of what exists across all my redis nodes.
In my case I got 5 entries out of 19. I have 6 nodes, using redisjson + redisearch.
Does anyone how to solve this issue? Using the node-redis npm package; I create my indexes and use redisearch commands.
I tried looking through PARTITIONS and RSCoordinator, nothing seemed to help
Upvotes: 2
Views: 577
Reputation: 2058
No. It is not a timeout problem. At least until Version 7.2 it is a deliberate choice of Redis to not offer the full version of the RSCoordinator, which is now part of RediSearch - for the enterprise version.
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.
The open source version merely gets the RSCoordinatorLight. This means, indices are NOT synced. Thus, despite you see your records being inserted into the database and sharded, the query running against the cluster would not have a chance to pickup the records, which reside on the other 2 nodes (assuming you have a cluster of 3 nodes).
Thus, forget to use Redis Cluster as open source if you intend to use any other search functionality than get-by-key. That is true for:
Basically all the standard functions one would need.
Workaround To get around this problem, there are 3 options:
Upvotes: 0
Reputation: 171
Partial results could be due to timeout. Please try adding TIMEOUT 0
to FT.SEARCH command, to see you get all results.
See also https://redis.io/docs/stack/search/configuring/#timeout
Upvotes: 1