I have a scenario where I need to return the position of a word in the field (same as Term Vectors position) within the search results of a keyword.
I have couple of questions:
- Term Vectors API would only work on an ID/Multi ID. Instead, can we achieve this using Search API as well?
- Is there a way to leverage Term Vectors by ID to return only matching keyword terms but not every term of a field?
Example use-case to achieve:
Searching for a keyword car in an index using _search API should return all the documents which match the keyword car along with positions of only car term in set of fields.