Hi,
I’d like to allow the user to search only for matches inside his groups. I added the group id to the match label, something like this “label.GID:XXX-XXXX-XXXX-XXXX1”.
I’ve also come up with multiple possible implementations for this so far.
- Get the list of user groups and query each one. It’s simple but it’s not practical nor scalable. It means I have to send a query for each group the user is part of.
- Send the list of group ids in the bleve query. Something like this “+label.GID: [XXX-XXXX-XXXX-XXXX1,XXX-XXXX-XXXX-XXXX2,XXX-XXXX-XXXX-XXXX3,…]”. This should, hypothetically, return all the matches that have any of these group ids. I assume this would be better and more practical. However, I couldn’t make it work. Are there any suggestions to make it work or any other alternative solution?
This is for authoritative matches and I’m using Golang SDK.