Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Symfony][Symfony2][inny]Wyszukiwarka - ElasticaBundle, SoirBundle - zwraca pusty wynik
michau85
post
Post #1





Grupa: Zarejestrowani
Postów: 87
Pomógł: 1
Dołączył: 3.01.2010

Ostrzeżenie: (0%)
-----


Witajcie
Chcę w projekcie symfony zaimplementować wyszukiwarkę produktów. Chciałbym wykorzystać do tego np. ElasticaBundle. Nie wiem co robię źle,bo rezultatem wyszukiwania jest pusta tablica. Jeśli chodzi o Elastica to próbowałem nawet przepisać ten przykład który jest w dokumentacji na githubie Moja konfiguracja wygląda tak:
  1.  
  2.  
  3. /// Controller
  4.  
  5. public function indexAction() {
  6. $finder = $this->container->get('fos_elastica.finder.app.user');
  7. $results = $finder->find('Ula');
  8. ///return new Response($results);
  9. var_dump($results);
  10. }
  11.  
  12.  
  13. ///app/config.yml
  14.  
  15. fos_elastica:
  16. clients:
  17. default: { host: localhost, port: 3306}
  18. indexes:
  19. app:
  20. types:
  21. user:
  22. mappings:
  23. username:
  24. type: string
  25. firstName:
  26. type: string
  27. lastName:
  28. type: string
  29. email:
  30. type: string
  31. persistence:
  32. # the driver can be orm, mongodb, phpcr or propel
  33. # listener and finder are not supported by
  34. # propel and should be removed
  35. driver: orm
  36. model: SklepBundle\Entity\User
  37. provider: ~
  38. finder: ~
  39. listener: ~
  40.  
  41.  


Próbowałem też użyć SoirBundle, ale skutek jest podobny. Dodam jeszcze że pracuję na xampie. Będę wdzieczny za podpowiedzi
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.08.2025 - 10:35