1 | <?php |
||
31 | abstract class AbstractSearchScrollRequest extends AbstractBaseRequest |
||
32 | { |
||
33 | const PARAM_SCROLL = 'scroll'; |
||
34 | const PARAM_SCROLL_ID = 'scroll_id'; |
||
35 | const REQUEST_ACTION = '_search/scroll'; |
||
36 | |||
37 | 39 | public function __construct($index, $type, SerializerInterface $serializer, array $serializerParams = array()) |
|
38 | { |
||
39 | //overwriting index type for this request |
||
40 | 39 | parent::__construct(null, null, $serializer, $serializerParams); |
|
41 | 39 | } |
|
42 | |||
43 | /** |
||
44 | * @inheritdoc |
||
45 | */ |
||
46 | 3 | public function getMethod() |
|
50 | |||
51 | /** |
||
52 | * @inheritdoc |
||
53 | */ |
||
54 | 3 | public function getAction() |
|
58 | |||
59 | /** |
||
60 | * @inheritdoc |
||
61 | */ |
||
62 | 3 | public function getBody() |
|
66 | |||
67 | /** |
||
68 | * @inheritdoc |
||
69 | */ |
||
70 | 3 | public function setBody($body) |
|
74 | |||
75 | /** |
||
76 | * Sets the scroll_id as query parameter for request |
||
77 | * |
||
78 | * @param string $scrollId |
||
79 | * @author Daniel Wendlandt |
||
80 | */ |
||
81 | 3 | public function setScrollId($scrollId) |
|
85 | |||
86 | /** |
||
87 | * Sets the scroll parameter as query parameter. |
||
88 | * Parameter is in elastichsearch time unit |
||
89 | * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#time-units |
||
90 | * |
||
91 | * @param $scrollTimeUnit |
||
92 | * @author Daniel Wendlandt |
||
93 | */ |
||
94 | 3 | public function setScroll($scrollTimeUnit) |
|
98 | |||
99 | } |
||
100 |