Description
Hi,
Currently the full text search allows you to create index for one text field only using the following command:
const query = new Parse.Query(Parse.User);
query.fullText('firstName', text);
query.select('$score','firstName','lastName');
query.ascending('$score');
const results = await query.find({
sessionToken: sessionToken
});
MongoDB support compound text index which allows you to create one index and search on multiple string fields so if I have a user collection and this collection contains 2 fields of: firstName and lastName I want that my app will allow to search users either by their first name of by their last name.
Now, If I go my my collection and create the compound index manually (on both fields) and run the query above it works. But If I don't create the compound index ahead and run the same query then parse will auto create the index for me but this index will be a single index (in the example above it will create the text index for the firstName field only) and it will allows me to search users only by their first name. I think that the fullText function should also receive an array of fields and not only one single field because if it will stay like this we actually lose functionality which can be supported out of the box.
Thanks in advance.