Get X word before and after search word

Hello,

I'm trying to find way how to get words/terms around search word eg let's
have a document with text "The best search engine is ElasticSearch". I will
search for "best" and get info that word "search" is xtime the next one
after search words.

Thx
Petr

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/4a1b4896-6263-4de2-ad45-dc5efd4df7a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hey,

you potentially could use the termvectors API for this, see

Not sure, if this is excalty, what you are after... maybe explain your
use-case a bit more

--Alex

On Tue, Jun 17, 2014 at 2:19 PM, Petr Janský petr.jansky@6hats.cz wrote:

Hello,

I'm trying to find way how to get words/terms around search word eg let's
have a document with text "The best search engine is Elasticsearch". I will
search for "best" and get info that word "search" is xtime the next one
after search words.

Thx
Petr

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/4a1b4896-6263-4de2-ad45-dc5efd4df7a3%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/4a1b4896-6263-4de2-ad45-dc5efd4df7a3%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGCwEM_J4biH1Dbce%2Bqh6VYd3hzK1LQYk43Okj4zE52BocR6Mw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Span queries are another option, but the main drawback is that they use
non-analyzed term queries.

--
Ivan

On Thu, Jun 19, 2014 at 2:11 AM, Alexander Reelsen alr@spinscale.de wrote:

Hey,

you potentially could use the termvectors API for this, see
Elasticsearch Platform — Find real-time answers at scale | Elastic

Not sure, if this is excalty, what you are after... maybe explain your
use-case a bit more

--Alex

On Tue, Jun 17, 2014 at 2:19 PM, Petr Janský petr.jansky@6hats.cz wrote:

Hello,

I'm trying to find way how to get words/terms around search word eg let's
have a document with text "The best search engine is Elasticsearch". I will
search for "best" and get info that word "search" is xtime the next one
after search words.

Thx
Petr

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/4a1b4896-6263-4de2-ad45-dc5efd4df7a3%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/4a1b4896-6263-4de2-ad45-dc5efd4df7a3%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGCwEM_J4biH1Dbce%2Bqh6VYd3hzK1LQYk43Okj4zE52BocR6Mw%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAGCwEM_J4biH1Dbce%2Bqh6VYd3hzK1LQYk43Okj4zE52BocR6Mw%40mail.gmail.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBaEAJsB3HM7yRqd0kTWC-Qum627R%3DZLtLKVihVde_xNw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.