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
{{ message }}
Repository navigation
Full text search - support multiple fields from SDK #5152
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.
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.
Activity
dplewis commentedon Oct 31, 2018
@ranhsd Feel free to open a PR.
rihadavid commentedon Nov 2, 2018
It could also somehow accept
weightsarray 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.stale commentedon Dec 17, 2018
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.