Skip to content

Commit

Permalink
fixes #634
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Kalkbrenner committed Dec 11, 2018
1 parent dec9b1e commit 03e2f7a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to the solarium library will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [4.2.1]
### Fixed
- Support for add-distinct and removeregex modifiers in Document::setFieldModifier


## [4.2.0]
### Fixed
- If a term contains a space, the space needs to be quoted by Helper::escapeTerm()
Expand Down
2 changes: 1 addition & 1 deletion src/QueryType/Update/Query/Document/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ public function setKey($key, $value = null)
*/
public function setFieldModifier($key, $modifier = null)
{
if (!in_array($modifier, [self::MODIFIER_ADD, self::MODIFIER_ADD_DISTINCT, self::MODIFIER_REMOVE, self::MODIFIER_INC, self::MODIFIER_SET], true)) {
if (!in_array($modifier, [self::MODIFIER_ADD, self::MODIFIER_ADD_DISTINCT, self::MODIFIER_REMOVE, self::MODIFIER_REMOVEREGEX, self::MODIFIER_INC, self::MODIFIER_SET], true)) {
throw new RuntimeException('Attempt to set an atomic update modifier that is not supported');
}
$this->modifiers[$key] = $modifier;
Expand Down

0 comments on commit 03e2f7a

Please sign in to comment.