Skip to content

Commit fffe6a4

Browse files
committed
Refresh for Elastica\Index::flush implemented #316
1 parent 5365894 commit fffe6a4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

changes.txt

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CHANGES
44
- Elastica\Index::exists fixed for 0.90.0. HEAD request method introduced
55
- Elastica\Filter\AbstractMulti::getFilters() added
66
- Implement Elastica\Type\Mapping::enableAllField
7+
- Refresh for Elastica\Index::flush implemented #316
78

89
2013-04-23
910
- Removed Elastica\Exception\AbstractException

lib/Elastica/Index.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -370,11 +370,10 @@ public function clearCache()
370370
* @return \Elastica\Response Response object
371371
* @link http://www.elasticsearch.org/guide/reference/api/admin-indices-flush.html
372372
*/
373-
public function flush()
373+
public function flush($refresh = false)
374374
{
375375
$path = '_flush';
376-
// TODO: Add option for refresh
377-
return $this->request($path, Request::POST);
376+
return $this->request($path, Request::POST, array(), array('refresh' => $refresh));
378377
}
379378

380379
/**

0 commit comments

Comments
 (0)