Giter VIP home page Giter VIP logo

Comments (3)

raz-mon avatar raz-mon commented on May 29, 2024

Hi @ayouman95, thanks for reaching out!
This is the default limit of the search results returned for an FT.SEARCH command, you can see this by running FT.INFO idx:vertical_MY, and observing the MAXSEARCHRESULTS config param (notice that there is a parallel MAXAGGREGATERESULTS for FT.AGGREGATE commands).
You can change this by using FT.CONFIG SET MAXSEARCHRESULTS <value>, and then get the wanted number of results from your command.

from redisearch.

keithchew avatar keithchew commented on May 29, 2024

hi @ayouman95 I created a test case to check limit 10000 2 and it works for me.

In bash, create 200,000 records:

for i in {1..200000}
do
redis-cli hset namespace:test$i address test$i totalSold $i
done

Create index:

FT.CREATE testidx ON hash PREFIX 1 'namespace:' SCHEMA address TAG totalSold numeric SORTABLE

Then, execute the queries:

ft.search testidx "*" LIMIT 10000 2

which returns:

1) "200000"
2) "namespace:test10001"
3) 1) "address"
   2) "test10001"
   3) "totalSold"
   4) "10001"
4) "namespace:test10002"
5) 1) "address"
   2) "test10002"
   3) "totalSold"
   4) "10002"

from redisearch.

keithchew avatar keithchew commented on May 29, 2024

my bad, it looks like I did not pass in the MAXSEARCHRESULTS variable and the default is 1,000,000:

> ft.config get MAXSEARCHRESULTS
1) 1) "MAXSEARCHRESULTS"
   2) "1000000"

If this is set to 10,000, then there will be no results, like your case. Do note that if you did specify an offset greater than 10,000 then an error will be returned:

> ft.search testidx "*" LIMIT 10001 2
"OFFSET exceeds maximum of 10000"

from redisearch.

Related Issues (20)

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.