C
C
Cyril2019-04-29 15:15:59
PostgreSQL
Cyril, 2019-04-29 15:15:59

How to implement search on multiple columns of a table if using Symfony 4 and PostgreSQL 10?

Are there any examples of using full text search in Siphon 4? For example, there is a User entity, and there is a repository of this UserRepository entity. In the repository, I implement the findForUser () method, where I set the SQL query through createQueryBuilder.
I tried to specify in the where() condition those things that are related to full-text search in PostgreSQL, but Doctrine does not "know" many things.
Can you show an example of how to correctly implement a search on multiple fields in Symphony 4 using createQueryBuilder()?
Problems start when I do a LEFT JOIN of other tables in createQueryBuilder() and search by their fields.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2019-04-29
@Austin_Powers

Have a look at doctrine-extension . A number of functions for postgres (and not only) are defined there.
You can also create your own custom functions, connect and then use in dql

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question