Przeglądaj źródła

elastica mapping

Vincent GUFFON 3 lat temu
rodzic
commit
48ae5ba1e0

+ 5 - 19
config/packages/elastica.yaml

@@ -1,6 +1,9 @@
+imports:
+  - { resource: elastica/ }
+
 fos_elastica:
   clients:
-    default: { host: 'es', port: '9200' }
+    default: { host: '%env(resolve:ELASTICSEARCH_HOST)%', port: '%env(resolve:ELASTICSEARCH_PORT)%' }
   indexes:
     search:
       use_alias: true
@@ -21,21 +24,4 @@ fos_elastica:
               custom_search_analyzer:
                 type:    custom
                 tokenizer:    standard
-                filter:    [standard, asciifolding ,lowercase]
-      types:
-        organization:
-          persistence:
-            driver: orm
-            model: 'App\Entity\Organization\Organization'
-            listener: ~
-            finder: ~
-            elastica_to_model_transformer:
-              ignore_missing: true
-            provider: ~
-          mappings:
-            id:
-              index: not_analyzed
-              type: integer
-            name:
-              analyzer: custom_analyzer
-              search_analyzer: custom_search_analyzer
+                filter:    [standard, asciifolding ,lowercase]

+ 24 - 0
config/packages/elastica/educationNotation.yaml

@@ -0,0 +1,24 @@
+fos_elastica:
+  indexes:
+    search:
+      types:
+        educationNotation:
+          persistence:
+            driver: orm
+            model: 'App\Entity\Education\EducationNotation'
+            listener: ~
+            finder: ~
+            elastica_to_model_transformer:
+              ignore_missing: true
+          mappings:
+            id:
+              index: not_analyzed
+              type: integer
+            note_origine:
+              analyzer: custom_analyzer
+              search_analyzer: custom_search_analyzer
+              property_path: false
+            note_recalcul:
+              analyzer: custom_analyzer
+              search_analyzer: custom_search_analyzer
+              property_path: false

+ 20 - 0
config/packages/elastica/organization.yaml

@@ -0,0 +1,20 @@
+fos_elastica:
+  indexes:
+    search:
+      types:
+        organization:
+          persistence:
+            driver: orm
+            model: 'App\Entity\Organization\Organization'
+            listener: ~
+            finder: ~
+            elastica_to_model_transformer:
+              ignore_missing: true
+            provider: ~
+          mappings:
+            id:
+              index: not_analyzed
+              type: integer
+            name:
+              analyzer: custom_analyzer
+              search_analyzer: custom_search_analyzer