# Configuration ElasticaBundle Analyzer

**URL:** <https://discuss.elastic.co/t/configuration-elasticabundle-analyzer/76809>\
**Category:** Discussions en français\
**Created:** [February 28, 2017, 3:27pm UTC](https://discuss.elastic.co/t/configuration-elasticabundle-analyzer/76809 "2017-02-28T15:27:23Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kiki](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kiki/32/15943_2.png) [@Kiki](https://discuss.elastic.co/u/Kiki)\
**Post date:** [February 28, 2017, 3:27pm UTC](https://discuss.elastic.co/t/configuration-elasticabundle-analyzer/76809/1 "2017-02-28T15:27:23Z")

</div>

Bonjour,

J'essaie, tant bien que mal, de configurer mon analyzer pour ElasticSearch avec ElastiaBundle.

Mais j'ai l'impression que celui-ci n'est pas pris en compte.

Voici la configuration :

```auto
fos_elastica:
    indexes:
        app:
            client: default
            settings:
                  analysis:
                    analyzer:
                      custom_analyzer :
                        type : custom
                        tokenizer: nGram
                        filter : [my_stopwords, asciifolding ,lowercase, snowball, my_elision, worddelimiter]
                      custom_search_analyzer :
                        type : custom
                        tokenizer: standard
                        filter : [my_stopwords, asciifolding ,lowercase, snowball, my_elision, worddelimiter]
                    filter:
                      snowball:
                        type: snowball
                        language: French
                      my_elision:
                        type: elision
                        articles: ["l", "m", "t", "qu", "n", "s", "j", "d"]
                      my_stopwords:
                        type: stop
                        stopwords: [_french_]
                        ignore_case : true
                      worddelimiter :
                        type: word_delimiter

```

Et voici un de mes mappings :

```auto
##### Document #####
                Document:
                    mappings: 
                        id: ~
                        title:
                            index_analyzer: custom_analyzer
                            search_analyzer : custom_search_analyzer
                        resume:
                            index_analyzer: custom_analyzer
                            search_analyzer : custom_search_analyzer
                        date: ~
                        documentType:   
                            type: object
                            properties:
                                id: ~
                                name: ~
                        files:
                            type: object
                            properties:
                                id: ~
                                name: ~
                                path : ~
                    persistence:
                        driver: orm
                        model: ManageBundle\Entity\Document
                        repository: ManageBundle\RepositoryElastica\DocumentRepositoryElastica
                        provider: ~
                        listener: ~
                        finder: ~

```

Ensuite, depuis mon terminal je fais : php app/console fos:elastica:populate

Mais mon analyzer custom n'est pas du tout pris en compte et je n'arrive pas à voir pourquoi.

SI quelqu'un pouvait m"aider, ce serait bien car je cherche depuis 1 semaine et j'ai rien trouvé

D'avance, Merci !

Benjamin

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 1, 2017, 10:14am UTC](https://discuss.elastic.co/t/configuration-elasticabundle-analyzer/76809/2 "2017-03-01T10:14:17Z")

</div>

Que donne un `GET ton_index/_mapping` ?

---

<div class="post-metadata">

**Author:** ![Kiki](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kiki/32/15943_2.png) [@Kiki](https://discuss.elastic.co/u/Kiki)\
**Post date:** [March 1, 2017, 11:02am UTC](https://discuss.elastic.co/t/configuration-elasticabundle-analyzer/76809/3 "2017-03-01T11:02:55Z")

</div>

Le Mapping donne :

* * *

## "Document": { "\_meta": { "model": "ManageBundle\Entity\Document"},"properties": { "authors": { "properties": { "id": { "type": "integer"},"name": { "type": "string"},"nationality": { "properties": { "id": { "type": "integer"},"name": { "type": "string"}}}}},"date": { "type": "date","format": "date\_time\_no\_millis"},"documentType": { "properties": { "id": { "type": "integer"},"name": { "type": "string"}}},"events": { "properties": { "id": { "type": "integer"},"name": { "type": "string"}}},"files": { "properties": { "id": { "type": "integer"},"name": { "type": "string"},"path": { "type": "string"}}},"id": { "type": "integer"},"resume": { "type": "string"},"tags": { "properties": { "id": { "type": "integer"},"name": { "type": "string"}}},"title": { "type": "string"}}},

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 1, 2017, 11:18am UTC](https://discuss.elastic.co/t/configuration-elasticabundle-analyzer/76809/4 "2017-03-01T11:18:29Z")

</div>

Please format your code using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

Tu peux donner le résultat complet de `GET ton_index/_mapping?pretty` STP?

---

<div class="post-metadata">

**Author:** ![Kiki](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kiki/32/15943_2.png) [@Kiki](https://discuss.elastic.co/u/Kiki)\
**Post date:** [March 1, 2017, 12:21pm UTC](https://discuss.elastic.co/t/configuration-elasticabundle-analyzer/76809/5 "2017-03-01T12:21:48Z")

</div>

Mince, désolé !

```auto
"Document": {

    "_meta": {
        "model": "ManageBundle\Entity\Document"
    },
    "properties": {
        "authors": {
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "nationality": {
                    "properties": {
                        "id": {
                            "type": "integer"
                        },
                        "name": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "date": {
            "type": "date",
            "format": "date_time_no_millis"
        },
        "documentType": {
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "events": {
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "files": {
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "path": {
                    "type": "string"
                }
            }
        },
        "id": {
            "type": "integer"
        },
        "resume": {
            "type": "string"
        },
        "tags": {
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "title": {
            "type": "string"
        }
    }

},

```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 1, 2017, 12:47pm UTC](https://discuss.elastic.co/t/configuration-elasticabundle-analyzer/76809/6 "2017-03-01T12:47:10Z")

</div>

Est-ce qu'il y a autre chose après `},` ou quelque chose avant `"Document": {`?

Peux-tu envoyer le résultat complet?

Egalement le résultat de `GET ton_index/_settings?pretty`?

Est-ce que tu détruis bien l'index existant quand tu relances ton application?  
Sinon je suppose que ce n'est pas écrasé.

---

<div class="post-metadata">

**Author:** ![Kiki](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kiki/32/15943_2.png) [@Kiki](https://discuss.elastic.co/u/Kiki)\
**Post date:** [March 1, 2017, 1:10pm UTC](https://discuss.elastic.co/t/configuration-elasticabundle-analyzer/76809/7 "2017-03-01T13:10:04Z")

</div>

Voici le résultat complet:

```auto
{
    "app": {
        "mappings": {
            "Tag": {
                "_meta": {
                    "model": "ManageBundle\Entity\Tag"
                },
                "properties": {
                    "documents": {
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "title": {
                                "type": "string"
                            }
                        }
                    },
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "tagCategory": {
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "string"
                            }
                        }
                    },
                    "tagColor": {
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "Event": {
                "_meta": {
                    "model": "ManageBundle\Entity\Event"
                },
                "properties": {
                    "date": {
                        "type": "string"
                    },
                    "documents": {
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "title": {
                                "type": "string"
                            }
                        }
                    },
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    }
                }
            },
            "Author": {
                "_meta": {
                    "model": "ManageBundle\Entity\Author"
                },
                "properties": {
                    "companies": {
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "string"
                            }
                        }
                    },
                    "documents": {
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "title": {
                                "type": "string"
                            }
                        }
                    },
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                }
            },
            "Document": {
                "_meta": {
                    "model": "ManageBundle\Entity\Document"
                },
                "properties": {
                    "authors": {
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "string"
                            },
                            "nationality": {
                                "properties": {
                                    "id": {
                                        "type": "integer"
                                    },
                                    "name": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    },
                    "date": {
                        "type": "date",
                        "format": "date_time_no_millis"
                    },
                    "documentType": {
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "string"
                            }
                        }
                    },
                    "events": {
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "string"
                            }
                        }
                    },
                    "files": {
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "string"
                            },
                            "path": {
                                "type": "string"
                            }
                        }
                    },
                    "id": {
                        "type": "integer"
                    },
                    "resume": {
                        "type": "string"
                    },
                    "tags": {
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "string"
                            }
                        }
                    },
                    "title": {
                        "type": "string"
                    }
                }
            },
            "File": {
                "_meta": {
                    "model": "ManageBundle\Entity\File"
                },
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string"
                    }
                }
            }
        }
    }
}

```

---

<div class="post-metadata">

**Author:** ![Kiki](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kiki/32/15943_2.png) [@Kiki](https://discuss.elastic.co/u/Kiki)\
**Post date:** [March 1, 2017, 1:10pm UTC](https://discuss.elastic.co/t/configuration-elasticabundle-analyzer/76809/8 "2017-03-01T13:10:35Z")

</div>

Comment puis-je voir si je détruis bien l'index quand je relance l'application ?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 1, 2017, 1:35pm UTC](https://discuss.elastic.co/t/configuration-elasticabundle-analyzer/76809/9 "2017-03-01T13:35:25Z")

</div>

`DELETE app`.

Ou en curl:

```auto
curl -XDELETE localhost:9200/app

```

---

<div class="post-metadata">

**Author:** ![Kiki](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kiki/32/15943_2.png) [@Kiki](https://discuss.elastic.co/u/Kiki)\
**Post date:** [March 1, 2017, 1:53pm UTC](https://discuss.elastic.co/t/configuration-elasticabundle-analyzer/76809/10 "2017-03-01T13:53:53Z")

</div>

Ah d'accord, avant de relancer mon application, je dois détruire l'index et le reconstruire c'est ça ?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 1, 2017, 2:40pm UTC](https://discuss.elastic.co/t/configuration-elasticabundle-analyzer/76809/11 "2017-03-01T14:40:09Z")

</div>

Je suppose. Je ne sais pas comment fonctionne ElasticaBundle

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 29, 2017, 2:40pm UTC](https://discuss.elastic.co/t/configuration-elasticabundle-analyzer/76809/12 "2017-03-29T14:40:39Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
