You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the client side, we should provide support for Index creation and Querying. APIs should allow users to use popular WKT libraries that parse and "serialise" to WKT format (e.g. https://github.com/cschwarz/wkx)
Consider the following type-script pseudo-code:
// Geometry primitives will be used from third-party libraries and serialized to WKTletp=newwkx.Polygon([newwkx.Point(1,2),newwkx.Point(3,4),newwkx.Point(5,6),newwkx.Point(1,2)]);awaitclient.hSet('land:123',{geometry: p.toWkt(),// Serialisationprice: 29000})awaitclient.ft.create('idx:land',{'geometry': {type: SchemaFieldTypes.GEOSHAPE// New field typeCOORD_SYSTEM: GeoshapeFieldCoordSystem.FLAT// Coordinate system type },'price': {type: SchemaFieldTypes.NUMERIC,}},{ON: 'HASH',PREFIX: 'land:'});letareaOfInterest=newwkx.Polygon([newwkx.Point(1,2),newwkx.Point(3,4),newwkx.Point(5,6),newwkx.Point(1,2)]);letresult=awaitclient.ft.search('idx:land','@geometry:[WITHIN $area] @price:[20000 30000]',{PARAMS: {area: areaOfInterest.toWkt()}});
Requirements:
Add support for GEOSHAPE fields:
Perform validations to allow passing only POLYGON and POINT geometry primitives.
Support specifying the coordinate system
Ensure that querying API is compatible with GEOSHAPE queries
Since RediSearch 2.8, it's possible to do more advanced GEO querying with GEOSHAPE fields.
On the client side, we should provide support for Index creation and Querying. APIs should allow users to use popular WKT libraries that parse and "serialise" to WKT format (e.g. https://github.com/cschwarz/wkx)
Consider the following type-script pseudo-code:
Requirements:
POLYGON
andPOINT
geometry primitives.GEOSHAPE
queriesReference documentation:
https://redis.io/commands/ft.create/
https://redis.io/commands/ft.search/
The text was updated successfully, but these errors were encountered: