Method: OpenSearch::API::Actions#termvectors
- Defined in:
- lib/opensearch/api/actions/termvectors.rb
#termvectors(arguments = {}) ⇒ Object
Returns information and statistics about terms in the fields of a particular document.
*Deprecation notice*: Specifying types in urls has been deprecated Deprecated since version 7.0.0
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/opensearch/api/actions/termvectors.rb', line 54 def termvectors(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] headers = arguments.delete(:headers) || {} arguments = arguments.clone _index = arguments.delete(:index) _id = arguments.delete(:id) method = if arguments[:body] OpenSearch::API::HTTP_POST else OpenSearch::API::HTTP_GET end endpoint = arguments.delete(:endpoint) || '_termvectors' path = if _index && _id "#{Utils.__listify(_index)}/#{endpoint}/#{Utils.__listify(_id)}" else "#{Utils.__listify(_index)}/#{endpoint}" end params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end |