0

I use FOQElasticaBundle to integrate Elastic Search into my Symfony2 project. I have an entity called Recipe, this entity has property $draft that indicates that the recipe is not complete yet. I want to exclude recipes that has the property $draft = 1 from Elastic Search results.

This is part of my foq_elastica configuration:

...
types:
    chef:
        mappings:
            surname: {boost: 5}
            name: {boost: 4}
            nbLikes: { index: not_analyzed }
            nbFollowers: { index: not_analyzed }
            persistence:
            driver: orm
            model: Interacso\ApiBundle\Entity\Chef
            identifier: id
            provider: ~
            finder: ~
            listener: ~
    recipe:
        mappings:
            name: {boost: 100}
            chefName: {boost: 10}
            chefSurname: {boost: 10}
            bookNames: {boost: 5}
            ingredientNames: {boost: 2}
            tagNames: {boost: 2}
        persistence:
            driver: orm
            model: Interacso\ApiBundle\Entity\Recipe
            identifier: id
            provider: ~
            finder: ~
            listener: ~
....

Any suggestion?

4

1 に答える 1