# Direct access to bleve (or something simpler)

**URL:** <https://forum.heroiclabs.com/t/direct-access-to-bleve-or-something-simpler/1571>\
**Category:** Game Design\
**Created:** [April 15, 2021, 10:56am UTC](https://forum.heroiclabs.com/t/direct-access-to-bleve-or-something-simpler/1571 "2021-04-15T10:56:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![2heavymental](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/2heavymental/32/614_2.png) [@2heavymental](https://forum.heroiclabs.com/u/2heavymental)\
**Post date:** [April 15, 2021, 10:56am UTC](https://forum.heroiclabs.com/t/direct-access-to-bleve-or-something-simpler/1571/1 "2021-04-15T10:56:44Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![novabyte](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/novabyte/32/1324_2.png) [@novabyte](https://forum.heroiclabs.com/u/novabyte)\
**Post date:** [April 15, 2021, 4:15pm UTC](https://forum.heroiclabs.com/t/direct-access-to-bleve-or-something-simpler/1571/2 "2021-04-15T16:15:02Z")

</div>

Hi @2heavymental welcome 👋

> 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](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](https://www.postgresql.org/docs/current/pgtrgm.html) 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.
