[CDRIVER-360] Geo index options are not supported by create_index functions Created: 25/Apr/14  Updated: 19/Oct/16  Resolved: 04/Nov/14

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1.0

Type: Improvement Priority: Major - P3
Reporter: Kamran K. Assignee: Tyler Brock
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The mongoc_index_opt_t struct and the *create_index* functions don't seem to support these geo index options:

  • min
  • max
  • bits
  • bucketSize

http://docs.mongodb.org/manual/tutorial/build-a-geohaystack-index/ has info about bucketSize and http://docs.mongodb.org/manual/tutorial/build-a-2d-index/ has info about min, max, and bits.



 Comments   
Comment by Githook User [ 04/Nov/14 ]

Author:

{u'username': u'TylerBrock', u'name': u'Tyler Brock', u'email': u'tyler.brock@gmail.com'}

Message: CDRIVER-360 add additional geo index options

Closes #109
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/2c85418147f7aff7b9ae3a168e3eb726ee6e6f43

Comment by Tyler Brock [ 31/Oct/14 ]

https://github.com/mongodb/mongo-c-driver/pull/109

Comment by Tyler Brock [ 30/Oct/14 ]

I think undocumented options are best left to manually run commands.

Comment by Kamran K. [ 30/Oct/14 ]

There are also (mostly undocumented) 2dsphere index options like "finestIndexedLevel" and "coarsestIndexedLevel". I'm not sure if they're worth worrying about for now, though.

Comment by Tyler Brock [ 30/Oct/14 ]

Greg says that we can use uint8_t for bits_precision but need min/max/bucket_size to be double.

Comment by Tyler Brock [ 30/Oct/14 ]

Yes, we have ample space.

Comment by Andrew Morrow (Inactive) [ 30/Oct/14 ]

tyler.brock@gmail.com Does the struct have adequate padding such that adding these new fields will not be an ABI break?

Comment by Tyler Brock [ 30/Oct/14 ]

Thinking of adding the following members to the struct:

   uint8_t       2d_bits_precision;     /* Maximum value is 32 */
   int8_t        2d_location_min;       /* Inclusive */
   int8_t        2d_location_max;       /* Non-inclusive */
   uint8_t       haystack_bucket_size;

Perhaps greg_10gen or siyuan.zhou@10gen.com could tell us if this is enough bits + correct signedness to represent the following concepts for 2d/haystack indexes.

Comment by Christian Hergert [ 25/Apr/14 ]

Thanks for reporting. I'll schedule this into the next sprint.

Generated at Wed Feb 07 21:09:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.