0

すべて「何か」に等しいクエリを作成したいのですが、それ以外は、「idcategoria」、「idinstitucion」、「idtipooa」のフィールドでフィルタリングできます。

fos_elastica:
clients:
    default: { host: localhost, port: 9200 }
indexes:
    website:
        client: default
        types:
             ofertas:
                 mappings:
                     id: { boost: 3 }
                     nombreoa: { analyzer: snowball }
                     titulo: {boost: 3}
                     duracion: {boost: 3}
                     uniduracion: {boost: 3}
                     email: {boost: 3}
                     caracteristicas: { analyzer: snowball }
                     requisitos: ~
                     planestudio: ~
                     matricula: {boost: 3}
                     cuota: {boost: 3}
                     estado: {boost: 3}
                     dirigidoa: {boost: 3}
                     url: {boost: 3}
                     idareaestudio:
                        type: "nested"
                        properties:
                            nombre: { boost: 5 }
                     idcategoria:
                        type: "nested"
                        properties:
                            nombre: { boost: 5 }
                     idinstitucion:
                        type: "nested"
                        properties:
                            nombreinstitucion: { boost: 5 }      
                            nombresede: { boost: 5 }
                     idmodalidadoa:
                        type: "nested"
                        properties:
                            nombre: { boost: 5 }  
                     idniveloa:
                        type: "nested"
                        properties:
                            nombre: { boost: 5 } 
                     idtipooa:
                        type: "nested"
                        properties:
                            nombre: { boost: 5 }                   
                 persistence:
                    driver: orm
                    model: FrontEnd\AplicacionBundle\Entity\Oa
                    provider: ~
                    finder: ~
                    repository: FrontEnd\AplicacionBundle\Repository\OaRepository

私は試した:

> { 
"query": {
    "filtered": {
          "query":  {  "text": { "_all":   "Aboga"}},
   "filter": {  "term": { "idtipooa.nombre": "Universitaria" }}
}
}}

しかし、それはうまくいきませんでした。誰か助けてください...ありがとう!

4

1 に答える 1