algolia integration formulaire symfony -
i looking integrate algolia search bar. able index elements without problem.
this form:
public function searchaction(request $request) { $article = new article(); $form = $this->createformbuilder($article) ->add('title') ->getform() ; if ($form->handlerequest($request)->isvalid()) { $this->get('algolia.indexer')->search( $this->getentitymanager(article::class), 'adminbundle:article', 'test'); return $this- >render('mainbundle:search:searchresults.html.twig', array( 'article' => $article )); } return $this->render('@main/search/search.html.twig', array( 'form' => $form->createview(), )); }
the problem search not done, documentation not explicit enough.
who me? thank you
Comments
Post a Comment