Highlight analyzed field with stop words

2014-01-01 Thread mayap
Hi,

In the following query we perform exact match which includes stop word, 
which is not highlighted, since the highlight is performed on analyzed 
field:
{
  query: {
match: {
  _all: {
query: \My name is\
  }
}
  },
  fields: [
_source
  ],
  highlight: {
fields: {
  text.*: {}
}
  }
}
result:  emMy/em emname/em is .
If the match is not exact we do want to exclude the stop words from the 
highlighting. (That's why I don't think that defining our own analyzer will 
solve the problem)

Q 1. Is it possible in case of exact match the perform highlighting on 
_source field with some parameters? We tried that and got no highlighting 
at all. Is there some other possibility?
Q 2. Why do the words My, name are highlighted separately? We use fvh 
since in the mapping we defined:
template_textEnglish: {
mapping: {
index: analyzed
store: no
analyzer: english
type: string
*term_vector: with_positions_offsets*
}
match: text.English.*
}
}

Any help would be appreciated.

Thanks.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/b8a99c46-eb77-4cd5-a6f1-adbbbe12a79d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Highlight values from one field in another field

2013-12-31 Thread mayap
Thanks for your reply. 

I have another question:
Is it possible in highlight_query (I'm using version 0.90.9) to use few 
highlight tags? For example I want to highlight text field with tag1 
for one sub query  and with tag2 for another sub query?



On Tuesday, December 31, 2013 4:42:20 PM UTC+2, Nikolas Everett wrote:

 You mean you want the terms highlighted in one field to come from the 
 contents of another field rather than the query?  If so, then Elasticsearch 
 doesn't support that already but you could write a custom highlighter to do 
 that.

 Nik


 On Tue, Dec 31, 2013 at 9:40 AM, mayap maya.p...@gmail.com 
 javascript:wrote:

 Hi All,

 We have multi value field - name. We would like to highlight those 
 values in anther field - text. For example, for the values:
 name : [name1, name2, name3, name4]
 text : name1 is a friend of name2

 we would like to get the result: 
 highlight: {
  text : [emname1/em is a friend of emname2/em ]
 }

 Is it possible to reach that in a single query?

 Thanks.

- 

  -- 
 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 elasticsearc...@googlegroups.com javascript:.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/elasticsearch/a717c411-3d9f-432d-97d3-713cef5d378e%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/443130dc-9a82-45d0-a3a9-866ddb9bd5e3%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.