任何方式对所有查询进行排序FOSElasticaBundle

时间:2018-07-11 14:15:44

标签: symfony foselasticabundle

我将此实体映射到FOSElasticaBUndle:

            content:
                mappings:
                    preTitle: ~
                    title: ~
                    code: ~
                    subtitle: ~
                    inlet: ~
                    text: ~
                    lang: ~
                    status: ~
                    created_at:
                        type: date
                    dueDate:
                        type: date
                    author:
                        type: 'nested'
                        properties:
                            id: ~
                            fullName: ~
                    developerArea:
                        type: 'nested'
                        properties:
                            id: ~
                            name: ~
                    type:
                        type: 'nested'
                        properties:
                            id: ~
                            name: ~
                    universities:
                        type: 'nested'
                        properties:
                            id: ~
                            name: ~
                    communicationSupports:
                        type: 'nested'
                        properties:
                            id: ~
                            name: ~
                    newsProtagonists:
                        type: 'nested'
                        properties:
                            id: ~
                            name: ~
                    finalDestinataries:
                        type: 'nested'
                        properties:
                            id: ~
                            name: ~
                    brandAttributes:
                        type: 'nested'
                        properties:
                            id:
                            academicPrestige: ~
                            socialImpact: ~
                            criticalSpirit: ~
                            pedagogicalInnovation: ~
                            investigation: ~
                            competencyDevelopment: ~
                            dsiValues: ~
                            prideBelonging: ~
                            internationalization: ~
                            employability: ~

我想配置它以获取按created_at字段排序的所有查询。

我知道我可以编程方式执行此操作,但是我的项目已经开始进行大量查询。有什么方法比修改所有查询更容易?

0 个答案:

没有答案