【问题标题】:adding offset to elastic search query向弹性搜索查询添加偏移量
【发布时间】:2015-05-01 07:58:36
【问题描述】:

我有以下代码:

 $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);

我想在这个查询中有偏移量。我该怎么做?

【问题讨论】:

    标签: elasticsearch foselasticabundle


    【解决方案1】:

    使用 FromSize (Elasticsearch API) 参数。我不熟悉 FOSElasticaBundle 但this question demonstrates the syntax

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-02-22
      • 1970-01-01
      • 2014-11-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多