Skip to content

Commit ddf8ec6

Browse files
committed
[API] warn: termvector is deprecated, use plural version termvectors instead
1 parent 06fba79 commit ddf8ec6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def termvectors(arguments = {})
6666
Elasticsearch::API::HTTP_GET
6767
end
6868

69-
endpoint = arguments.delete(:endpoint) || '_termvectors'
69+
arguments.delete(:endpoint)
7070
path = if _index && _id
7171
"#{Utils.__listify(_index)}/_termvectors/#{Utils.__listify(_id)}"
7272
else
@@ -82,6 +82,7 @@ def termvectors(arguments = {})
8282
# Deprecated: Use the plural version, {#termvectors}
8383
#
8484
def termvector(arguments = {})
85+
warn '[DEPRECATION] `termvector` is deprecated. Please use the plural version, `termvectors` instead.'
8586
termvectors(arguments.merge(endpoint: '_termvector'))
8687
end
8788
end

0 commit comments

Comments
 (0)