Provision to retrieve matched tokens ( From lucene ) and position directly


(vineeth mohan-2) #1

Hi ,

I would like to know if there is any way to retrieve the matched token from
the index rather than the _source feed or any other feed stored.

So if the text is "elephant is a big ANIMAL" and i search for the term
"animal" , my expected result is ( Assuming i have applied the analyzer
with lowercase)

{
"token" : "animal",
"start_offset" : 20,
"end_offset" : 28,
"type" : "",
"position" : 5
}

Is this possible with Elasticsearch ?

Thanks
Vineeth

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Adrien Grand) #2

Unfortunately, even at the Lucene level, this is something which is not
doable (yet[1]). The API that looks the closest to what you are looking for
is the term vectors API[2], which will be available in Elasticsearch 1.0.

[1] https://issues.apache.org/jira/browse/LUCENE-2878
[2]
http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-termvectors.html

--
Adrien Grand

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #3