Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Search Option "seq_no_primary_term" and Index Options… #2234

Open
wants to merge 4 commits into
base: 8.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Added support for custom key to IpRange and GeoDistance `addRange` using a common trait [#2227](https://github.com/ruflin/Elastica/pull/2227)
* Added bucket sort aggregation [#2229](https://github.com/ruflin/Elastica/pull/2229)

### Changed
* Add support for Search Option "seq_no_primary_term" and Index Options "if_primary_term" and "if_seq_no" [#2234](https://github.com/ruflin/Elastica/pull/2234)

### Fixed
* Fixed Pipeline Processor handling to allow for multiple processors of the same type [#2218](https://github.com/ruflin/Elastica/pull/2218)

Expand Down
2 changes: 2 additions & 0 deletions src/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ public function addDocument(Document $doc): Response
'retry_on_conflict',
'routing',
'timeout',
'if_primary_term',
'if_seq_no',
]
);

Expand Down
2 changes: 2 additions & 0 deletions src/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class Search
public const OPTION_SHARD_REQUEST_CACHE = 'request_cache';
public const OPTION_FILTER_PATH = 'filter_path';
public const OPTION_TYPED_KEYS = 'typed_keys';
public const OPTION_SEQ_NO_PRIMARY_TERM = 'seq_no_primary_term';

/*
* Search types
Expand Down Expand Up @@ -419,6 +420,7 @@ protected function validateOption(string $key): void
case self::OPTION_SHARD_REQUEST_CACHE:
case self::OPTION_FILTER_PATH:
case self::OPTION_TYPED_KEYS:
case self::OPTION_SEQ_NO_PRIMARY_TERM:
return;
}

Expand Down