diff --git a/search.go b/search.go index 2be5517f..ed76466c 100644 --- a/search.go +++ b/search.go @@ -458,9 +458,16 @@ func (s *SearchService) TypedKeys(enabled bool) *SearchService { return s } -// SeqNoPrimaryTerm specifies whether to return sequence number and -// primary term of the last modification of each hit. +// SeqNoPrimaryTerm is an alias for SeqNoAndPrimaryTerm. +// +// Deprecated: Use SeqNoAndPrimaryTerm. func (s *SearchService) SeqNoPrimaryTerm(enabled bool) *SearchService { + return s.SeqNoAndPrimaryTerm(enabled) +} + +// SeqNoAndPrimaryTerm specifies whether to return sequence number and +// primary term of the last modification of each hit. +func (s *SearchService) SeqNoAndPrimaryTerm(enabled bool) *SearchService { s.seqNoPrimaryTerm = &enabled return s } diff --git a/xpack_async_search_submit.go b/xpack_async_search_submit.go index f2c13b69..11ece685 100644 --- a/xpack_async_search_submit.go +++ b/xpack_async_search_submit.go @@ -453,9 +453,16 @@ func (s *XPackAsyncSearchSubmit) TypedKeys(enabled bool) *XPackAsyncSearchSubmit return s } -// SeqNoPrimaryTerm specifies whether to return sequence number and -// primary term of the last modification of each hit. +// SeqNoPrimaryTerm is an alias for SeqNoAndPrimaryTerm. +// +// Deprecated: Use SeqNoAndPrimaryTerm instead. func (s *XPackAsyncSearchSubmit) SeqNoPrimaryTerm(enabled bool) *XPackAsyncSearchSubmit { + return s.SeqNoAndPrimaryTerm(enabled) +} + +// SeqNoAndPrimaryTerm specifies whether to return sequence number and +// primary term of the last modification of each hit. +func (s *XPackAsyncSearchSubmit) SeqNoAndPrimaryTerm(enabled bool) *XPackAsyncSearchSubmit { s.seqNoPrimaryTerm = &enabled return s }