Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [SF2][FOS] Elastica, ElasticSearch
kpt_lucek
post 14.07.2016, 19:43:52
Post #1





Grupa: Zarejestrowani
Postów: 428
Pomógł: 77
Dołączył: 10.07.2011
Skąd: Warszawa

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


Witajcie

Borykam się z problemem odpowiedniego szukania danych zaindexowanych w ES.

Mój index wygląda mniej więcej tak:
Kod
     app:
            client:     default
            index_name: app_%kernel.environment%
            types:
                country_data:
                    mappings:
                        id:
                            type: integer
                        postal_code:
                            type: string
                        name:
                            type: string
                        city:
                            type: string
                        voivodeship:
                            type: string
                        address:
                            type: string
                        district:
                            type: string
                        range:
                            type: string
                        community:
                            type: string
                        gus_voivodeship:
                            type: string
                        gus_district:
                            type: string
                        gus_community:
                            type: string
                        gus_community_type:
                            type: string
                        gus_symbol:
                            type: string
                    persistence:
                        driver: orm
                        model: MojBundle\Entity\CountryData
                        provider: ~
                        listener:
                            immediate: ~
                        finder: ~


Szukałem tego mniej więcej tak:
  1. $city->setFieldQuery('city', $query);
  2. $postalCode->setFieldQuery('postal_code', $query);
  3. $district->setFieldQuery('district', $query);
  4. $voivodeship->setFieldQuery('voivodeship', $query);
  5. $address->setFieldQuery('address', $query);
  6.  
  7. $boolQuery
  8. ->addShould($city)
  9. ->addShould($postalCode)
  10. ->addShould($district)
  11. ->addShould($voivodeship);


Lecz dla stringa 60-564 wielkopolskie poznań jezyce Grodziska dostaję dane często nie pasujące do tego patternu (np. zupełnie różny kod pocztowy)

Jakieś sugestie?

Ten post edytował kpt_lucek 14.07.2016, 19:46:23


--------------------


Cytat
There is a Bundle for that
Lukas Kahwe Smith - October 31th, 2014
Go to the top of the page
+Quote Post

Posty w temacie
- kpt_lucek   [SF2][FOS] Elastica, ElasticSearch   14.07.2016, 19:43:52


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 Wersja Lo-Fi Aktualny czas: 19.07.2025 - 18:14