Symfony Doctrine with FosElastic how to search from ORM and Elastic together?

For example

my entity has fields:

id (int)

title (text) (stored also in elastic)

content (text) (stored also in elastic)

categoryId (int)

status (int)

and i want to search text from title,content i use

//RepositoryManagerInterface $finder
$results = $finder->getRepository(Offer::class)->find('AUDI A6 C6 2.0');

when i want search in database example by categoryId

$offers = $this->getDoctrine()->getRepository(Offer::class)->customOfferQueryBuilderWithResult(['categoryId'=>5]);

how to search it together?
do I have to store categoryId also in elastic?

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *