Skip to content

feat(geo): add geosearchstore#4272

Closed
andydunstall wants to merge 1 commit intodragonflydb:mainfrom
andydunstall:add-geosearchstore
Closed

feat(geo): add geosearchstore#4272
andydunstall wants to merge 1 commit intodragonflydb:mainfrom
andydunstall:add-geosearchstore

Conversation

@andydunstall
Copy link
Copy Markdown
Contributor

Fixes #3883.

Adds support for GEOSEARCHSTORE. Follows the same approach as commands like XREAD/XREADGROUP with another FooGeneric method (note the naming is a bit confusing we theres both GeoSearchGeneric and GeoSearchStoreGeneric, but still seems like the cleanest option)

GeoSearchStoreGeneric already supports a store option so the changes here are small

Comment thread src/server/zset_family.cc
<< CI{"GEOPOS", CO::FAST | CO::READONLY, -2, 1, 1, acl::kGeoPos}.HFUNC(GeoPos)
<< CI{"GEODIST", CO::READONLY, -4, 1, 1, acl::kGeoDist}.HFUNC(GeoDist)
<< CI{"GEOSEARCH", CO::READONLY, -4, 1, 1, acl::kGeoSearch}.HFUNC(GeoSearch)
<< CI{"GEOSEARCHSTORE", CO::WRITE | CO::DENYOOM, -5, 1, 2, acl::kGeoSearchStore}.HFUNC(
Copy link
Copy Markdown
Contributor Author

@andydunstall andydunstall Dec 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm slightly guessing here about what CO:: params to use, not sure when CO::DENYOOM is needed etc - so just copied ZRANGESTORE which seems similar

@romange
Copy link
Copy Markdown
Collaborator

romange commented Jan 8, 2025

I wish this was reviewed before the refactoring. @andydunstall I am sorry, could you please adjust your changes and ask @BorysTheDev / Adi for review?

@kostasrim
Copy link
Copy Markdown
Contributor

I wish this was reviewed before the refactoring. @andydunstall I am sorry, could you please adjust your changes and ask @BorysTheDev / Adi for review?

Uh I am so sorry for this, I am happy to tag alone for help

@andydunstall andydunstall closed this by deleting the head repository Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

implement GEOSEARCHSTORE

3 participants