In the WhatsCooking project, there are a default index to performe $search stage and another index (facetIndex) to performe $searchMeta stage. Is this a good practice and why? Can I have a single index for perform $search and $searchMeta stages?
@Aasawari but we would need to have two fields in the mapping, one for “string” and one for “facetString”? if we wanted to have a filter for jobField for example?
Just seeing this and hope your project is coming along well. You could indeed use the facetIndex for both $search and $searchMeta, and it would probably save space, as well. I used 2 indexes for the sake of teaching explicitly the concept of indexes.