Highlighting bug?

A query wrapped in a "constant_score" inside a "should" of a "bool" doesn't
highlight. inside a "must" it does and without the "constant_score" it does
too. Is this intentional or a bug? If it's intentional, what is the
reasoning behind it...?

Here is a gist demonstrating this: https://gist.github.com/3899939

grtz,
Jelle

--

hey,

On Tuesday, October 16, 2012 5:29:34 PM UTC+2, wires wrote:

A query wrapped in a "constant_score" inside a "should" of a "bool"
doesn't highlight. inside a "must" it does and without the "constant_score"
it does too. Is this intentional or a bug? If it's intentional, what is the
reasoning behind it...?

I think this is a "limitation" / "bug" in ES. The lucene highlighter
doesn't support this at all out of the box and the ES highlighter only
supports the must case since it optimizes the boolean query if it only has
a single clause. can you create an issue for this problem on github?

simon

Here is a gist demonstrating this: Elastic search strange highlighting behaviour · GitHub

grtz,
Jelle

--

FYI - I created an issue in Lucene land and provided a fix for this.
([LUCENE-4486] Highlighter doesn't support ConstantScoreQuery - ASF JIRA). The elasticsearch
issue is here: Highlighting fails for ConstantScoreQuery · Issue #2332 · elastic/elasticsearch · GitHub I
will provide a PR soon so this should work in upcoming releases. Thanks for
reporting this!

simon

On Tuesday, October 16, 2012 11:26:20 PM UTC+2, simonw wrote:

hey,

On Tuesday, October 16, 2012 5:29:34 PM UTC+2, wires wrote:

A query wrapped in a "constant_score" inside a "should" of a "bool"
doesn't highlight. inside a "must" it does and without the "constant_score"
it does too. Is this intentional or a bug? If it's intentional, what is the
reasoning behind it...?

I think this is a "limitation" / "bug" in ES. The lucene highlighter
doesn't support this at all out of the box and the ES highlighter only
supports the must case since it optimizes the boolean query if it only has
a single clause. can you create an issue for this problem on github?

simon

Here is a gist demonstrating this: Elastic search strange highlighting behaviour · GitHub

grtz,
Jelle

--

Op woensdag 17 oktober 2012 09:58:52 UTC+2 schreef simonw het volgende:

FYI - I created an issue in Lucene land and provided a fix for this. (
[LUCENE-4486] Highlighter doesn't support ConstantScoreQuery - ASF JIRA). The elasticsearch
issue is here: Highlighting fails for ConstantScoreQuery · Issue #2332 · elastic/elasticsearch · GitHub I
will provide a PR soon so this should work in upcoming releases. Thanks for
reporting this!

Thanks! No problem, my collegue Ernst Bunders ran into this, I just
reported it and wrote the test.

Grtz,
Jelle.

--

FYI- this is fixed and will be in the next release!

On Thursday, October 18, 2012 10:22:19 AM UTC+2, wires wrote:

Op woensdag 17 oktober 2012 09:58:52 UTC+2 schreef simonw het volgende:

FYI - I created an issue in Lucene land and provided a fix for this. (
[LUCENE-4486] Highlighter doesn't support ConstantScoreQuery - ASF JIRA). The elasticsearch
issue is here: Highlighting fails for ConstantScoreQuery · Issue #2332 · elastic/elasticsearch · GitHub I
will provide a PR soon so this should work in upcoming releases. Thanks for
reporting this!

Thanks! No problem, my collegue Ernst Bunders ran into this, I just
reported it and wrote the test.

Grtz,
Jelle.

--

Op zondag 21 oktober 2012 11:38:00 UTC+2 schreef simonw het volgende:

FYI- this is fixed and will be in the next release!

awesome, thanks

--