Get matched keywords while searching on an analysed field


(rubyprince) #1

Hi,

Can someone help me with this?

--
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/c27269c2-4f20-441d-b124-5b40ac46bba0%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(David Pilato) #2

May be highlighting could help? http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-highlighting.html

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

Le 27 décembre 2013 at 10:17:46, Prince (princejcet@gmail.com) a écrit:

Hi,

Can someone help me with this?

http://stackoverflow.com/questions/20780104/get-matched-terms-in-the-query

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/c27269c2-4f20-441d-b124-5b40ac46bba0%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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/etPan.52bd57c6.333ab105.55aa%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/groups/opt_out.


(Nik Everett) #3

It would be possible to implement a "highlighter" that just returned which
terms matched which fields but Elasticsearch doesn't have one now. I think
you have two options at this point:

  1. Do something hacky with highlighting like asking for the text length to
    be the max(all_strings.map(strlen).max, min_highlight_length), strip the
    text that isn't highlighted, and dedupe.
  2. Do two searches either via multisearch or sequentially.

On Fri, Dec 27, 2013 at 5:34 AM, David Pilato david@pilato.fr wrote:

May be highlighting could help?
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-highlighting.html

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

Le 27 décembre 2013 at 10:17:46, Prince (princejcet@gmail.com//princejcet@gmail.com)
a écrit:

Hi,

Can someone help me with this?

http://stackoverflow.com/questions/20780104/get-matched-terms-in-the-query

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/c27269c2-4f20-441d-b124-5b40ac46bba0%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
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/etPan.52bd57c6.333ab105.55aa%40MacBook-Air-de-David.local
.

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

--
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/CAPmjWd1CtGBrO3Fme1H8xGYwpMdYoR10SY2fp%2B3%2BTHDU8RCQyA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #4