dweiss commented on a change in pull request #2127:
URL: https://github.com/apache/lucene-solr/pull/2127#discussion_r538162712
##########
File path:
lucene/highlighter/src/test/org/apache/lucene/search/matchhighlight/TestMatchRegionRetriever.java
##########
@@ -361,6 +374,41 @@ public void testIntervalQueries() throws IOException {
);
}
+ @Test
+ public void testDegenerateIntervalsWithPositions() throws IOException {
+ testDegenerateIntervals(FLD_TEXT_POS);
+ }
+
+ @Test @AwaitsFix(bugUrl =
"https://issues.apache.org/jira/browse/LUCENE-9634: " +
Review comment:
> I sort of think that just highlighting the original term is the
correct behaviour?
Hmm... I don't think I agree. When you have a query parser that allows
intervals then extend becomes a function just like anything else. The intuitive
user expectation for a query extend(foo 2 2) is to actually highlight the
matching interval of positions (well, users think of "words") pointed to by
that interval. This is particularly important if you're building more complex
expressions out of these (left/ right/ extend, etc.) and you wish to see
partial fragments as you're building more focused expressions.
I'm not saying this has to be fixed (neither do I know how it should) but
it's real feedback from people who use those queries intensively (and my gut
feeling agrees).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]