Percent_indexed appears to be inaccurate

Intended steps:

  1. FT.CREATE an index
  2. Run FT.INFO to obtain the percent_indexed. Repeat on a loop until indexing is complete
  3. Once indexing is complete, do something else

Redis docs say “percent_indexed: progress of background indexing (1 if complete).” (This makes me think that percent_indexed should actually be proportion_indexed.)

But if I get FT.INFO for the index every 100 ms for 10 cycles and print the percent_indexed and the num_records each time, the percent_indexed is always 1 but the num_records gradually increases:

num_records: 46
num_records: 1974
num_records: 4031
… up to numRecords: 17555 after 10 cycles

… and finally num_records: 3169037 if I wait a while and then check again.

Yet that whole time, percent_indexed is 1. So it seems that percent_indexed doesn’t really tell me whether my index is complete. If not, how can I find out?

EDIT: I’m getting different values in Redis JS and RedisInsight for a lot of the fields returned by FT.INFO. I think this is a problem just with Redis JS.

Many of the values returned by FT.INFO are inaccurate. It turns out that his has been reported here two weeks ago:

and I can confirm that the suggested workaround works well.