Skip to content

Commit

Permalink
Add missing changes.txt for ruflin#670
Browse files Browse the repository at this point in the history
  • Loading branch information
krzaczek committed Aug 25, 2014
1 parent c3be89f commit fde3b65
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
CHANGES

2014-08-25
- Top-level filter parameter in search has been renamed to post_filter #699 #670

2014-08-22
- Fixed escaping of / character in Elastica\Util::escapeTerm(), removed usage of JSON_UNESCAPED_SLASHES in Elastica\JSON #660

Expand Down
3 changes: 3 additions & 0 deletions lib/Elastica/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ public function getQuery()
*/
public function setFilter(AbstractFilter $filter)
{
trigger_error('Deprecated: Elastica\Query::setFilter() is deprecated. Use Elastica\Query::setPostFilter() instead.', E_USER_DEPRECATED);
return $this->setPostFilter($filter);
}

Expand Down Expand Up @@ -418,6 +419,8 @@ public function setPostFilter($filter)
if($filter instanceof AbstractFilter)
{
$filter = $filter->toArray();
} else {
trigger_error('Deprecated: Elastica\Query::setPostFilter() passing filter as array is deprecated. Pass instance of AbstractFilter instead.', E_USER_DEPRECATED);
}

return $this->setParam("post_filter", $filter);
Expand Down

0 comments on commit fde3b65

Please sign in to comment.