You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
It could also somehow accept weights array parameter, maybe in the options parameter (required to be the same length as the fields array), because multi-field text index can define different levels of importance for the resulting score.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi,
Currently the full text search allows you to create index for one text field only using the following command:
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.
The text was updated successfully, but these errors were encountered: