Symfony2 FOSElastica和Elasticsearch

时间:2015-12-08 13:17:14

标签: symfony elasticsearch foselasticabundle

我使用此配置进行弹性搜索功能搜索功能。现在,当我填充索引时,搜索功能正常工作,我得到了理想的结果。但是,经过一段时间(几个小时),搜索停止工作,结果是完全错误的。应用程序使用cron作业在配置(和其他数据)中记录的每15分钟更新一次实体。我应该更新索引作为实体更新,如果是这样,我该怎么做?其中一些与团队和球员有关。

我正在使用FOSElasticaBundle 3.0。

fos_elastica:
clients:
    default: { host: localhost, port: 9200 }
indexes:
    kladise:
        finder: ~
        types:
            blogs:
                mappings:
                    title: ~
                    shortContent: ~

                persistence:
                    driver: orm
                    model: Acme\BlogBundle\Entity\Post
                    provider: ~
                    listener: ~
                    finder: ~

            tips:
                mappings:
                    title: ~
                    shortContent: ~

                persistence:
                    driver: orm
                    model: Acme\TipsterBundle\Entity\Tip
                    provider: ~
                    listener: ~
                    finder: ~

            soccer_players:
                mappings:
                    firstName: ~
                    lastName: ~
                    name: ~

                persistence:
                    driver: orm
                    model: Acme\SoccerBundle\Entity\People
                    provider: ~
                    listener: ~
                    finder: ~

            soccer_teams:
                mappings:
                    clubName: ~
                    shortName: ~
                    officialName: ~

                persistence:
                    driver: orm
                    model: Acme\SoccerBundle\Entity\Team
                    provider: ~
                    listener: ~
                    finder: ~

            hockey_players:
                mappings:
                    firstName: ~
                    lastName: ~
                    name: ~

                persistence:
                    driver: orm
                    model: Acme\HockeyBundle\Entity\People
                    provider: ~
                    listener: ~
                    finder: ~

            hockey_teams:
                mappings:
                    clubName: ~
                    shortName: ~
                    officialName: ~

                persistence:
                    driver: orm
                    model: Acme\HockeyBundle\Entity\Team
                    provider: ~
                    listener: ~
                    finder: ~

            handball_players:
                mappings:
                    firstName: ~
                    lastName: ~
                    name: ~

                persistence:
                    driver: orm
                    model: Acme\HandballBundle\Entity\People
                    provider: ~
                    listener: ~
                    finder: ~

            handball_teams:
                mappings:
                    clubName: ~
                    shortName: ~
                    officialName: ~

                persistence:
                    driver: orm
                    model: Acme\HandballBundle\Entity\Team
                    provider: ~
                    listener: ~
                    finder: ~

            basketball_players:
                mappings:
                    firstName: ~
                    lastName: ~
                    name: ~

                persistence:
                    driver: orm
                    model: Acme\BasketballBundle\Entity\People
                    provider: ~
                    listener: ~
                    finder: ~

            basketball_teams:
                mappings:
                    clubName: ~
                    shortName: ~
                    officialName: ~

                persistence:
                    driver: orm
                    model: Acme\BasketballBundle\Entity\Team
                    provider: ~
                    listener: ~
                    finder: ~

0 个答案:

没有答案