Default listener settings of FOSElasticaBundle is set to automatically update elasticsearch index in real time when an object is added, updated or removed. It is set as listener: ~ in the config file. If you want to control it yourself then you can use examples below. However, it only applies to parent object if you have child object in mapping as well so you will have to create a custom service listener/subscriber to handle child objects.


Prevent all


listener:
insert: false
update: false
delete: false

More options


# Update es index on all operations 
listener:
insert: true
update: true
delete: true

listener: ~

# Update es index only if a new object is inserted
listener:
insert: true
update: false
delete: false

listener:
update: false
delete: false

# Update es index only if an existing object is updated
listener:
insert: false
update: true
delete: false

listener:
insert: false
delete: false

# Update es index only if an existing object is deleted
listener:
insert: false
update: false
delete: true

listener:
insert: false
update: false

# Update es index only if only if a new object is inserted or an existing object is updated
listener:
insert: true
update: true
delete: false

listener:
delete: false

# Update es index only if only if a new object is inserted or an existing object is deleted
listener:
insert: true
update: false
delete: true

listener:
update: false