Hi Growthbook team :wave: Hope this is the right ...
# announcements
c
Hi Growthbook team 👋 Hope this is the right channel for questions 🙏 We’re running Growthbook with an Azure Cosmos DB instance. When clicking on
Run Analysis
on a Metric, we receive this error:
The index path corresponding to the specified order-by item is excluded.
It seems like we need to index the fields used when sorting the result from the db. It seem to happen on this endpoint:
POST metric/:metricId/analysis
. Do you have any pointers on if sorting is done here? I tried to search through the code but didn’t find anything. Thanks in advance!
f
Hi Sean, one sec, let me look into it
c
Did you find anything? I understand if you didn’t since Cosmos DB is a bit out of scope for Growthbook 😊
f
it seems that any time we do a sort on Mongo results, for it to be compatible for Cosmos, we need to add an index to that collection for those exact fields, as you thought.
it should be possible to fix, we just have to adjust Mongoose for this
can you open an issue for it so we can keep track?
c
I see. Sure thing! Thanks for having a look at it 🙏 https://github.com/growthbook/growthbook/issues/1356 Do you have an ETA for this? I’ll need to assess whether or not we should wait for it or replace our Cosmos DB with a pure MongoDB instance instead 🙂