Highlight missing for multi-word text phrase query with non zero slop

Just noticed a weird issue where highlight for a few search results
are missing in case of text phrase query with slop 3(in my case) for a
multi-word query(where order of words in query is not same as in
document).

E.g.
Tested on Versions - 0.18.6/0.18.7

Mapping for field:

"raw_content":{
"index_analyzer":"snowball",
"search_analyzer":"snowball",
"boost":0.5,
"index": "analyzed",
"store": "yes",
"type": u"string",
"term_vector" : "with_positions_offsets"},

Query:

"query": {"text": {"raw_content": {"query": "good people", "type":
"phrase", "slop": 3}}}

Actual text in raw_content field:

"... public health and the movement of people and goods, and other
factors ..."

Above document is present in the search results but highlights are
missing instead if I reverse search terms as mentioned below.

Query:

"query": {"text": {"raw_content": {"query": "people good", "type":
"phrase", "slop": 3}}}

Now, I have document with highlights present.

It seems order of words in multi-words query is important in case of
slop but search is working perfectly either ways only highlights are
failing.

Pardon me if I am missing some basic stuff and do consider if its a
genuine issue.

A Small Update:

Tested scenario with span_near query with in_order:false. Still
highlights are missing.

Query:
"query": {"span_near": {"in_order": false, "clauses": [{"span_term":
{"raw_content": "good"}}, {"span_term": {"raw_content": "people"}}],
"slop": 3}}

On Feb 21, 1:21 pm, Raj rajdeepn...@gmail.com wrote:

Just noticed a weird issue where highlight for a few search results
are missing in case of text phrase query with slop 3(in my case) for a
multi-word query(where order of words in query is not same as in
document).

E.g.
Tested on Versions - 0.18.6/0.18.7

Mapping for field:

"raw_content":{
"index_analyzer":"snowball",
"search_analyzer":"snowball",
"boost":0.5,
"index": "analyzed",
"store": "yes",
"type": u"string",
"term_vector" : "with_positions_offsets"},

Query:

"query": {"text": {"raw_content": {"query": "good people", "type":
"phrase", "slop": 3}}}

Actual text in raw_content field:

"... public health and the movement of people and goods, and other
factors ..."

Above document is present in the search results but highlights are
missing instead if I reverse search terms as mentioned below.

Query:

"query": {"text": {"raw_content": {"query": "people good", "type":
"phrase", "slop": 3}}}

Now, I have document with highlights present.

It seems order of words in multi-words query is important in case of
slop but search is working perfectly either ways only highlights are
failing.

Pardon me if I am missing some basic stuff and do consider if its a
genuine issue.

I am seeing this same issue as well, where a proximity search in a
query_string matches (order doesn't matter) yet the fast vector highlighter
returns no highlighted content (unless in correct order).

Any updates on this issue?

On Tuesday, February 21, 2012 4:02:44 AM UTC-5, Raj wrote:

A Small Update:

Tested scenario with span_near query with in_order:false. Still
highlights are missing.

Query:
"query": {"span_near": {"in_order": false, "clauses": [{"span_term":
{"raw_content": "good"}}, {"span_term": {"raw_content": "people"}}],
"slop": 3}}

On Feb 21, 1:21 pm, Raj rajdeepn...@gmail.com wrote:

Just noticed a weird issue where highlight for a few search results
are missing in case of text phrase query with slop 3(in my case) for a
multi-word query(where order of words in query is not same as in
document).

E.g.
Tested on Versions - 0.18.6/0.18.7

Mapping for field:

"raw_content":{
"index_analyzer":"snowball",
"search_analyzer":"snowball",
"boost":0.5,
"index": "analyzed",
"store": "yes",
"type": u"string",
"term_vector" : "with_positions_offsets"},

Query:

"query": {"text": {"raw_content": {"query": "good people", "type":
"phrase", "slop": 3}}}

Actual text in raw_content field:

"... public health and the movement of people and goods, and other
factors ..."

Above document is present in the search results but highlights are
missing instead if I reverse search terms as mentioned below.

Query:

"query": {"text": {"raw_content": {"query": "people good", "type":
"phrase", "slop": 3}}}

Now, I have document with highlights present.

It seems order of words in multi-words query is important in case of
slop but search is working perfectly either ways only highlights are
failing.

Pardon me if I am missing some basic stuff and do consider if its a
genuine issue.

On Tuesday, February 21, 2012 4:02:44 AM UTC-5, Raj wrote:

A Small Update:

Tested scenario with span_near query with in_order:false. Still
highlights are missing.

Query:
"query": {"span_near": {"in_order": false, "clauses": [{"span_term":
{"raw_content": "good"}}, {"span_term": {"raw_content": "people"}}],
"slop": 3}}

On Feb 21, 1:21 pm, Raj rajdeepn...@gmail.com wrote:

Just noticed a weird issue where highlight for a few search results
are missing in case of text phrase query with slop 3(in my case) for a
multi-word query(where order of words in query is not same as in
document).

E.g.
Tested on Versions - 0.18.6/0.18.7

Mapping for field:

"raw_content":{
"index_analyzer":"snowball",
"search_analyzer":"snowball",
"boost":0.5,
"index": "analyzed",
"store": "yes",
"type": u"string",
"term_vector" : "with_positions_offsets"},

Query:

"query": {"text": {"raw_content": {"query": "good people", "type":
"phrase", "slop": 3}}}

Actual text in raw_content field:

"... public health and the movement of people and goods, and other
factors ..."

Above document is present in the search results but highlights are
missing instead if I reverse search terms as mentioned below.

Query:

"query": {"text": {"raw_content": {"query": "people good", "type":
"phrase", "slop": 3}}}

Now, I have document with highlights present.

It seems order of words in multi-words query is important in case of
slop but search is working perfectly either ways only highlights are
failing.

Pardon me if I am missing some basic stuff and do consider if its a
genuine issue.

This ends up being an issue just with the fast vector highlighter, the
plain highlighter returns highlighted content no matter the order of the
proximity query.

Not sure if there is any way to make this work with fast vector
highlighting?

On Thursday, May 24, 2012 12:35:54 PM UTC-4, Robert wrote:

I am seeing this same issue as well, where a proximity search in a
query_string matches (order doesn't matter) yet the fast vector highlighter
returns no highlighted content (unless in correct order).

Any updates on this issue?

On Tuesday, February 21, 2012 4:02:44 AM UTC-5, Raj wrote:

A Small Update:

Tested scenario with span_near query with in_order:false. Still
highlights are missing.

Query:
"query": {"span_near": {"in_order": false, "clauses": [{"span_term":
{"raw_content": "good"}}, {"span_term": {"raw_content": "people"}}],
"slop": 3}}

On Feb 21, 1:21 pm, Raj rajdeepn...@gmail.com wrote:

Just noticed a weird issue where highlight for a few search results
are missing in case of text phrase query with slop 3(in my case) for a
multi-word query(where order of words in query is not same as in
document).

E.g.
Tested on Versions - 0.18.6/0.18.7

Mapping for field:

"raw_content":{
"index_analyzer":"snowball",
"search_analyzer":"snowball",
"boost":0.5,
"index": "analyzed",
"store": "yes",
"type": u"string",
"term_vector" : "with_positions_offsets"},

Query:

"query": {"text": {"raw_content": {"query": "good people", "type":
"phrase", "slop": 3}}}

Actual text in raw_content field:

"... public health and the movement of people and goods, and other
factors ..."

Above document is present in the search results but highlights are
missing instead if I reverse search terms as mentioned below.

Query:

"query": {"text": {"raw_content": {"query": "people good", "type":
"phrase", "slop": 3}}}

Now, I have document with highlights present.

It seems order of words in multi-words query is important in case of
slop but search is working perfectly either ways only highlights are
failing.

Pardon me if I am missing some basic stuff and do consider if its a
genuine issue.

On Tuesday, February 21, 2012 4:02:44 AM UTC-5, Raj wrote:

A Small Update:

Tested scenario with span_near query with in_order:false. Still
highlights are missing.

Query:
"query": {"span_near": {"in_order": false, "clauses": [{"span_term":
{"raw_content": "good"}}, {"span_term": {"raw_content": "people"}}],
"slop": 3}}

On Feb 21, 1:21 pm, Raj rajdeepn...@gmail.com wrote:

Just noticed a weird issue where highlight for a few search results
are missing in case of text phrase query with slop 3(in my case) for a
multi-word query(where order of words in query is not same as in
document).

E.g.
Tested on Versions - 0.18.6/0.18.7

Mapping for field:

"raw_content":{
"index_analyzer":"snowball",
"search_analyzer":"snowball",
"boost":0.5,
"index": "analyzed",
"store": "yes",
"type": u"string",
"term_vector" : "with_positions_offsets"},

Query:

"query": {"text": {"raw_content": {"query": "good people", "type":
"phrase", "slop": 3}}}

Actual text in raw_content field:

"... public health and the movement of people and goods, and other
factors ..."

Above document is present in the search results but highlights are
missing instead if I reverse search terms as mentioned below.

Query:

"query": {"text": {"raw_content": {"query": "people good", "type":
"phrase", "slop": 3}}}

Now, I have document with highlights present.

It seems order of words in multi-words query is important in case of
slop but search is working perfectly either ways only highlights are
failing.

Pardon me if I am missing some basic stuff and do consider if its a
genuine issue.

Which version are you using? Can you try with latest ES 0.19.4?

On Thu, May 24, 2012 at 10:40 PM, Robert rjabbott82@gmail.com wrote:

This ends up being an issue just with the fast vector highlighter, the
plain highlighter returns highlighted content no matter the order of the
proximity query.

Not sure if there is any way to make this work with fast vector
highlighting?

On Thursday, May 24, 2012 12:35:54 PM UTC-4, Robert wrote:

I am seeing this same issue as well, where a proximity search in a
query_string matches (order doesn't matter) yet the fast vector highlighter
returns no highlighted content (unless in correct order).

Any updates on this issue?

On Tuesday, February 21, 2012 4:02:44 AM UTC-5, Raj wrote:

A Small Update:

Tested scenario with span_near query with in_order:false. Still
highlights are missing.

Query:
"query": {"span_near": {"in_order": false, "clauses": [{"span_term":
{"raw_content": "good"}}, {"span_term": {"raw_content": "people"}}],
"slop": 3}}

On Feb 21, 1:21 pm, Raj rajdeepn...@gmail.com wrote:

Just noticed a weird issue where highlight for a few search results
are missing in case of text phrase query with slop 3(in my case) for a
multi-word query(where order of words in query is not same as in
document).

E.g.
Tested on Versions - 0.18.6/0.18.7

Mapping for field:

"raw_content":{
"index_analyzer":"snowball",
"search_analyzer":"snowball",
"boost":0.5,
"index": "analyzed",
"store": "yes",
"type": u"string",
"term_vector" : "with_positions_offsets"},

Query:

"query": {"text": {"raw_content": {"query": "good people", "type":
"phrase", "slop": 3}}}

Actual text in raw_content field:

"... public health and the movement of people and goods, and other
factors ..."

Above document is present in the search results but highlights are
missing instead if I reverse search terms as mentioned below.

Query:

"query": {"text": {"raw_content": {"query": "people good", "type":
"phrase", "slop": 3}}}

Now, I have document with highlights present.

It seems order of words in multi-words query is important in case of
slop but search is working perfectly either ways only highlights are
failing.

Pardon me if I am missing some basic stuff and do consider if its a
genuine issue.

On Tuesday, February 21, 2012 4:02:44 AM UTC-5, Raj wrote:

A Small Update:

Tested scenario with span_near query with in_order:false. Still
highlights are missing.

Query:
"query": {"span_near": {"in_order": false, "clauses": [{"span_term":
{"raw_content": "good"}}, {"span_term": {"raw_content": "people"}}],
"slop": 3}}

On Feb 21, 1:21 pm, Raj rajdeepn...@gmail.com wrote:

Just noticed a weird issue where highlight for a few search results
are missing in case of text phrase query with slop 3(in my case) for a
multi-word query(where order of words in query is not same as in
document).

E.g.
Tested on Versions - 0.18.6/0.18.7

Mapping for field:

"raw_content":{
"index_analyzer":"snowball",
"search_analyzer":"snowball",
"boost":0.5,
"index": "analyzed",
"store": "yes",
"type": u"string",
"term_vector" : "with_positions_offsets"},

Query:

"query": {"text": {"raw_content": {"query": "good people", "type":
"phrase", "slop": 3}}}

Actual text in raw_content field:

"... public health and the movement of people and goods, and other
factors ..."

Above document is present in the search results but highlights are
missing instead if I reverse search terms as mentioned below.

Query:

"query": {"text": {"raw_content": {"query": "people good", "type":
"phrase", "slop": 3}}}

Now, I have document with highlights present.

It seems order of words in multi-words query is important in case of
slop but search is working perfectly either ways only highlights are
failing.

Pardon me if I am missing some basic stuff and do consider if its a
genuine issue.

Originally was using 0.19.2, but also tried (and failed) with 0.19.4

I believe this is the same issue as
Redirecting to Google Groups , which
Issue Proximity and phrases search fast-vector-highlighter vs. highlighter + exposing highlighter · Issue #1986 · elastic/elasticsearch · GitHub was opened
for.

On Tuesday, May 29, 2012 2:20:12 PM UTC-4, kimchy wrote:

Which version are you using? Can you try with latest ES 0.19.4?

On Thu, May 24, 2012 at 10:40 PM, Robert rjabbott82@gmail.com wrote:

This ends up being an issue just with the fast vector highlighter, the
plain highlighter returns highlighted content no matter the order of the
proximity query.

Not sure if there is any way to make this work with fast vector
highlighting?

On Thursday, May 24, 2012 12:35:54 PM UTC-4, Robert wrote:

I am seeing this same issue as well, where a proximity search in a
query_string matches (order doesn't matter) yet the fast vector highlighter
returns no highlighted content (unless in correct order).

Any updates on this issue?

On Tuesday, February 21, 2012 4:02:44 AM UTC-5, Raj wrote:

A Small Update:

Tested scenario with span_near query with in_order:false. Still
highlights are missing.

Query:
"query": {"span_near": {"in_order": false, "clauses": [{"span_term":
{"raw_content": "good"}}, {"span_term": {"raw_content": "people"}}],
"slop": 3}}

On Feb 21, 1:21 pm, Raj rajdeepn...@gmail.com wrote:

Just noticed a weird issue where highlight for a few search results
are missing in case of text phrase query with slop 3(in my case) for
a
multi-word query(where order of words in query is not same as in
document).

E.g.
Tested on Versions - 0.18.6/0.18.7

Mapping for field:

"raw_content":{
"index_analyzer":"snowball",
"search_analyzer":"snowball",
"boost":0.5,
"index": "analyzed",
"store": "yes",
"type": u"string",
"term_vector" : "with_positions_offsets"},

Query:

"query": {"text": {"raw_content": {"query": "good people", "type":
"phrase", "slop": 3}}}

Actual text in raw_content field:

"... public health and the movement of people and goods, and other
factors ..."

Above document is present in the search results but highlights are
missing instead if I reverse search terms as mentioned below.

Query:

"query": {"text": {"raw_content": {"query": "people good", "type":
"phrase", "slop": 3}}}

Now, I have document with highlights present.

It seems order of words in multi-words query is important in case of
slop but search is working perfectly either ways only highlights are
failing.

Pardon me if I am missing some basic stuff and do consider if its a
genuine issue.

On Tuesday, February 21, 2012 4:02:44 AM UTC-5, Raj wrote:

A Small Update:

Tested scenario with span_near query with in_order:false. Still
highlights are missing.

Query:
"query": {"span_near": {"in_order": false, "clauses": [{"span_term":
{"raw_content": "good"}}, {"span_term": {"raw_content": "people"}}],
"slop": 3}}

On Feb 21, 1:21 pm, Raj rajdeepn...@gmail.com wrote:

Just noticed a weird issue where highlight for a few search results
are missing in case of text phrase query with slop 3(in my case) for
a
multi-word query(where order of words in query is not same as in
document).

E.g.
Tested on Versions - 0.18.6/0.18.7

Mapping for field:

"raw_content":{
"index_analyzer":"snowball",
"search_analyzer":"snowball",
"boost":0.5,
"index": "analyzed",
"store": "yes",
"type": u"string",
"term_vector" : "with_positions_offsets"},

Query:

"query": {"text": {"raw_content": {"query": "good people", "type":
"phrase", "slop": 3}}}

Actual text in raw_content field:

"... public health and the movement of people and goods, and other
factors ..."

Above document is present in the search results but highlights are
missing instead if I reverse search terms as mentioned below.

Query:

"query": {"text": {"raw_content": {"query": "people good", "type":
"phrase", "slop": 3}}}

Now, I have document with highlights present.

It seems order of words in multi-words query is important in case of
slop but search is working perfectly either ways only highlights are
failing.

Pardon me if I am missing some basic stuff and do consider if its a
genuine issue.

Is the only way around this currently (assuming we want to highlight
results in the phrase query even if they appear out of order) to turn
off the fast-vector highlighting for a field by setting not setting
"term_vector" : "with_positions_offsets" in our mapping?

On May 29, 2:04 pm, Robert rjabbot...@gmail.com wrote:

Originally was using 0.19.2, but also tried (and failed) with 0.19.4

I believe this is the same issue as Redirecting to Google Groups, which
Issuehttps://github.com/elasticsearch/elasticsearch/issues/1986was opened
for.

On Tuesday, May 29, 2012 2:20:12 PM UTC-4, kimchy wrote:

Which version are you using? Can you try with latest ES 0.19.4?

On Thu, May 24, 2012 at 10:40 PM, Robert rjabbot...@gmail.com wrote:

This ends up being an issue just with the fast vector highlighter, the
plain highlighter returns highlighted content no matter the order of the
proximity query.

Not sure if there is any way to make this work with fast vector
highlighting?

On Thursday, May 24, 2012 12:35:54 PM UTC-4, Robert wrote:

I am seeing this same issue as well, where a proximity search in a
query_string matches (order doesn't matter) yet the fast vector highlighter
returns no highlighted content (unless in correct order).

Any updates on this issue?

On Tuesday, February 21, 2012 4:02:44 AM UTC-5, Raj wrote:

A Small Update:

Tested scenario with span_near query with in_order:false. Still
highlights are missing.

Query:
"query": {"span_near": {"in_order": false, "clauses": [{"span_term":
{"raw_content": "good"}}, {"span_term": {"raw_content": "people"}}],
"slop": 3}}

On Feb 21, 1:21 pm, Raj rajdeepn...@gmail.com wrote:

Just noticed a weird issue where highlight for a few search results
are missing in case of text phrase query with slop 3(in my case) for
a
multi-word query(where order of words in query is not same as in
document).

E.g.
Tested on Versions - 0.18.6/0.18.7

Mapping for field:

"raw_content":{
"index_analyzer":"snowball",
"search_analyzer":"snowball",
"boost":0.5,
"index": "analyzed",
"store": "yes",
"type": u"string",
"term_vector" : "with_positions_offsets"},

Query:

"query": {"text": {"raw_content": {"query": "good people", "type":
"phrase", "slop": 3}}}

Actual text in raw_content field:

"... public health and the movement of people and goods, and other
factors ..."

Above document is present in the search results but highlights are
missing instead if I reverse search terms as mentioned below.

Query:

"query": {"text": {"raw_content": {"query": "people good", "type":
"phrase", "slop": 3}}}

Now, I have document with highlights present.

It seems order of words in multi-words query is important in case of
slop but search is working perfectly either ways only highlights are
failing.

Pardon me if I am missing some basic stuff and do consider if its a
genuine issue.

On Tuesday, February 21, 2012 4:02:44 AM UTC-5, Raj wrote:

A Small Update:

Tested scenario with span_near query with in_order:false. Still
highlights are missing.

Query:
"query": {"span_near": {"in_order": false, "clauses": [{"span_term":
{"raw_content": "good"}}, {"span_term": {"raw_content": "people"}}],
"slop": 3}}

On Feb 21, 1:21 pm, Raj rajdeepn...@gmail.com wrote:

Just noticed a weird issue where highlight for a few search results
are missing in case of text phrase query with slop 3(in my case) for
a
multi-word query(where order of words in query is not same as in
document).

E.g.
Tested on Versions - 0.18.6/0.18.7

Mapping for field:

"raw_content":{
"index_analyzer":"snowball",
"search_analyzer":"snowball",
"boost":0.5,
"index": "analyzed",
"store": "yes",
"type": u"string",
"term_vector" : "with_positions_offsets"},

Query:

"query": {"text": {"raw_content": {"query": "good people", "type":
"phrase", "slop": 3}}}

Actual text in raw_content field:

"... public health and the movement of people and goods, and other
factors ..."

Above document is present in the search results but highlights are
missing instead if I reverse search terms as mentioned below.

Query:

"query": {"text": {"raw_content": {"query": "people good", "type":
"phrase", "slop": 3}}}

Now, I have document with highlights present.

It seems order of words in multi-words query is important in case of
slop but search is working perfectly either ways only highlights are
failing.

Pardon me if I am missing some basic stuff and do consider if its a
genuine issue.