Offset of only one term in a document, not document vector


(reza) #1

Hi.

I have very large documents, and is not efficient to retrieve the document vector of a document.

How can i search the offset and position of a term of a document in Elasticsearch?

thanks.


(Adrien Grand) #2

Hi,

You already asked the same question two days ago, maybe you missed the answer? Start and end offset of a token in elasticsearch


(reza) #3

yes i know.

i don't know it's possible or not, but i need it, it's necessary for me. Do you have any approach?


(reza) #4

Can we filter the termvector based on a term value?


(Archana Manur) #5

Hi,
Yes, you can filter the termVector based on a term. I have been using this and works fine for me.

var result = _client.Termvector(_indexName, typeName, id, requestBody);
dynamic response = result.Response;
dynamic termVector = response.term_vectors;
dynamic tokens = termVector.Content.terms["" + query + ""].tokens;

Thanks,
Archana


(system) #6