ongr-io / ElasticsearchBundle

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

Invalid property type after an index deletion and recreation #939

Open pkly opened 4 years ago

pkly commented 4 years ago

When you change the declared property type in a document class like so

/**
 * @ES\Property(type="text")
 */
private $title;

To

/**
 * @ES\Property(type="keyword")
 */
private $title;

and then re-create the index by dropping it and creating it again, the field will not be updated in ElasticSearch.

It apprears that there's a cache issue, but even after doing the following:

ongr:es:index:create
ongr:es:cache:clear
ongr:es:index:drop --force
ongr:es:index:create

the changes do not persist.

The only way to update the document for ONGR is to add another field to the class.

PHP 7.2 ElasticSearch 7.6.2 Bundle 7.0.2 Symfony 4.4.8