// To check which fields are indexed Product.collection .getIndexes({ full: true }) .then((indexes) => { console.log('indexes:', indexes); }) .catch(console.error); // To check if indexing works (async () => { const result = await Product.find( { friendlyName: 'Nice other Name' }, '_id' ).explain('executionStats'); console.log(result); })();
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter