Hello everyone,
Was wondering if any of you had quite advanced knowledge on how to increase the speed of the mongodb request. I have watched the great video from @joshowens (https://www.youtube.com/watch?v=z9-9PCaEpbU) which explains clearly how indexes work for simple request (one or two field, one filter…) but my problematic is different but I guess far from unique.
I have a collection of products of around 7000 entries. These products have all similar data (color, size, weight, description, name, price, category…) and I have a filtering system that can allow you any type of custom search:
e.g:
- size more than 10 but weight less than 5 and description should include “wood” and “table” (using $and request).
- other search will be hardwood = true and price less than 1000 en description includes “tropical”
On top of this you have basic sorting by name or price, ascending, descending, etc… So my request can have from 1 simple field to more than 10 of them combined and sorting capacities.
I guess you can see where I am going : how to manage indexes to increase the speed of request ? I know we can do more bad than good with indexes so even though I am doing some tries with robomongo I still always get COLLSCAN and requests which I think could be faster.
Any help or guidance is welcome.
Thanks !