Custom indexes

34 views
Skip to first unread message

Rishabh Poddar

unread,
Nov 4, 2015, 5:27:33 PM11/4/15
to mongodb-dev
Hi all,

I'm a grad student at Berkeley, and I was looking to create a custom BTree index scheme. What I mean is, I want to create an index that computes some function on the indexed data, and uses the result of the function while traversing the index. 
I found a jira ticket that requests a similar feature, but it's been open for a while now (SERVER-153).
This is part of a class project, and I have no prior experience with the source code. I was hoping you'd have pointers about what a good starting point for this would be, and how to go about implementing this. What interfaces / classes to look at, whether there are any APIs for index plugins, etc.

Thanks plenty!

Rishabh Poddar

Dwight Merriman

unread,
Nov 10, 2015, 12:09:24 PM11/10/15
to mongodb-dev
there is no index plugin api afaik at this point.

start looking around src/mongo/db/storage/.

look at the README.md in that directory.

look at struct IndexKeyEntry and start finding what generates it.  that should get you started.

sometimes with unfamiliar code i just do the operation of interest and trace in debugger and it takes me to all the relevant code...

keys are generated in different ways for "regular" values, and for geospatial, so if you find where that branches, that might be a logical place.  

dwight
Reply all
Reply to author
Forward
0 new messages