https://www.growthbook.io/ logo
#announcements
Title
# announcements
c

clever-helmet-13121

06/07/2023, 2:52 PM
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

fresh-football-47124

06/07/2023, 4:40 PM
Hi Sean, one sec, let me look into it
c

clever-helmet-13121

06/09/2023, 8:45 AM
Did you find anything? I understand if you didn’t since Cosmos DB is a bit out of scope for Growthbook 😊
f

fresh-football-47124

06/09/2023, 1:05 PM
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

clever-helmet-13121

06/09/2023, 1:31 PM
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 🙂
11 Views