向弹性搜索查询添加偏移量

时间:2015-05-01 07:58:36

标签: elasticsearch foselasticabundle

我有以下代码:

 $pictureQuery = new \Elastica\Query\MultiMatch();
            $pictureQuery->setParam('query', $queryString);
            $pictureQuery->setType('phrase_prefix');
            $pictureQuery->setParam('fields', array(
                'caption'
            ));

            $filtered = new \Elastica\Query\Filtered($pictureQuery, new \Elastica\Filter\Missing('deletedAt'));
            $elasticaQuery = \Elastica\Query::create($filtered);
            $elasticaQuery->setLimit($limit);
            $pictures = $itemFinder->find($elasticaQuery);

我希望在此查询中有偏移量。我该怎么做?

1 个答案:

答案 0 :(得分:0)

使用发件人尺寸(Elasticsearch API)参数。我不熟悉FOSElasticaBundle但是this question demonstrates the syntax