Direct access to bleve (or something simpler)

I want to add ability to users to find other users by part of the name or wildcard.
I have not found such functionality in the Social API. It seems that this can be done using a Matchmaker API, but I think that is slightly strange. That is possible to do that via sql by
performing queries on user table, but I think that can degrade performance.
So, the questions:

  1. Can it be done in some standard way?
  2. If not it is possible to get access to bleve ?

Hi @2heavymental welcome :wave:

I want to add ability to users to find other users by part of the name or wildcard.

The best approach in this case is to leverage the BTREE unique index and use a case insensitive wildcard lookup (i.e. ILIKE):

https://github.com/heroiclabs/unity-sampleproject/blob/master/ServerModules/src/main.ts#L120-L134

You can make the search request even faster with a trigram index if you use Postgres as your database server for the game project. I don’t see a reason you’d use an in-memory search engine like Bleve.

Hope it helps.

1 Like