Highlighting bug?


(wires) #1

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

--


(simonw-2) #2

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: https://gist.github.com/3899939

grtz,
Jelle

--


(simonw-2) #3

FYI - I created an issue in Lucene land and provided a fix for this.
(https://issues.apache.org/jira/browse/LUCENE-4486). The elasticsearch
issue is here: https://github.com/elasticsearch/elasticsearch/issues/2332 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: https://gist.github.com/3899939

grtz,
Jelle

--


(wires) #4

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. (
https://issues.apache.org/jira/browse/LUCENE-4486). The elasticsearch
issue is here: https://github.com/elasticsearch/elasticsearch/issues/2332 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.

--


(simonw-2) #5

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. (
https://issues.apache.org/jira/browse/LUCENE-4486). The elasticsearch
issue is here: https://github.com/elasticsearch/elasticsearch/issues/2332 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.

--


(wires) #6

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

--


(system) #7