I want to add an if statement to an elasticsearch index in fos_elastica.yml file.
I have a column called reference with two possible values user or organization.
I want to index the data only if that value is organization
I'm using friendsofsymfony/elastica-bundle version 5.1
I found something related here but I cannot make it work: [1]https://www.elastic.co/guide/en/elasticsearch/reference/master/ingest-conditional-complex.html
My config looks like this:
.......
permissions:
type: nested
properties:
id:
type: integer
role:
type: string
reference:
type: object
properties:
id:
type: integer
name:
type: string
copy_to: organizations_names
slug:
type: string
index: not_analyzed
......