ongr-io / ElasticsearchBundle

Symfony bundle for Elasticsearch with steroids
MIT License
313 stars 189 forks source link

Fix "fields" annotation #894

Closed wasinger closed 4 years ago

wasinger commented 4 years ago

The fields property inside the Property annotation did not work. Though the Property class already had the fields member this was unused and one had to write the fields mapping inside the settings array. Now the following annotation works correctly:

    /**
     * @ES\Property(
     *  type="text",
     *  fields={
     *    "raw"={"type"="keyword"},
     *    "increment"={"type"="text", "analyzer"="incrementalAnalyzer"}
     *  }
     * )
     */