FOSElasticaBundle
FOSElasticaBundle copied to clipboard
Populate uses serializer in all types and ignores "properties"
Hello,
I have an application that indexes multiple entities. Some of the are intented to be indexed using jms serializer, other I would like to be indexed by mapping in "properties" property in the type definition.
But when I set the serializer at root node, the definitions at "properties" are ignored and the populate command uses only the serializer.
The configurations are
fos_elastica:
clients:
default: { host: elasticsearch, port: 9200 }
serializer:
serializer: jms_serializer
indexes:
contratos:
finder: ~
types:
produto_empresa:
serializer:
groups: [elastica]
version: '1.1'
serialize_null: true
persistence:
driver: orm
model: Templum\ClienteBundle\Entity\ProdutoEmpresa
provider: ~
finder: ~
organizacao_produto:
finder: ~
settings:
index:
analysis:
analyzer:
name_analyzer:
type: custom
tokenizer: standard
filter: [standard, lowercase, asciifolding, elision]
types:
organizacao_produto:
properties:
name_suggest:
type: completion
analyzer: name_analyzer
search_analyzer: name_analyzer
id:
type: keyword
persistence:
driver: orm
model: Templum\ClienteBundle\Entity\UnidadeNegocioProduto
listener: ~
finder: ~
Index contratos is indexed perfectly using serializer. But organizacao_produto is intended to use definitions in properties but it's using the serializer instead.
Any advice?
Hello,
This issue is over a year old, but I recently encountered the exact same problem.
I have 2 different types, each in its own index. I used to only have one using a ModelToElasticaTransformer, which was working just fine. But when I enable the serializer in order to use it only for my second type, it is also used for the first.
Is there any update concerning this subject?
Thanks in advance
seems this issue still exists for newer version of the bundle