0

We are using Redis search utility to cache our data in JSON format. We have stored approx 4.3 milions records. Where id is the key and property such as color, latitude, longitude, and googlepolyline geometry (string) as an attribute.

We have created index also on latitude and longitude columns that are numeric using Ft.create command.

We are searching data based on min-max latitude and longitude range.

It works perfectly and return result very fast, but suddenly after 2-3 hour when we update color property, either index got deleted automatically or redis search return null result when data is present for the given search criterion.

If we dont update anything then it works fine, but after property updation it starts behaving wierdly.

It either return less records than expected or return null.

When we refill the whole data and create index again then its starts behaving normally.

1 Answers1

1

Can you provide more details about the Redis and Search deployment and version that you're using?

btw you can use the GEO type when using lat/long to make query ranges or distance to a specific location.

For FT.CREATE

GEO allows geographic range queries against the value in this attribute. The value of the attribute must be a string containing a longitude (first) and latitude separated by a comma.

and for FT.SEARCH such as:

FT.SEARCH restaurants-idx "colour @location:[-122.41 37.77 5 km]"