[ 
https://issues.apache.org/jira/browse/LUCENE-9204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17352589#comment-17352589
 ] 

Michael Gibney commented on LUCENE-9204:
----------------------------------------

{quote}Intervals automatically rewrite disjunctions (and have done since 
LUCENE-8477) so that queries behave as your or I would expect them to
{quote}

Ah, right; I recall LUCENE-8477. To some extent that addresses the concerns I 
raised, or redirects my concern anyway:

In considering differences between spans and intervals, I think it's worth 
being explicit about the fact that LUCENE-8477 addresses the "positional query" 
challenges (common to both spans and intervals) by rewriting to enumerate all 
possible paths through the graph described by a nested query.

This punts (significantly, though arguably justifiably) on linear time; but 
since we're trying to clearly compare spans and intervals, it bears noting that 
this solution, albeit _implemented_ for intervals, is orthogonal to the 
fundamental distinction between intervals and spans, and could readily have 
been implemented over the latter as well.

The fundamental tradeoff of course is performance vs. intuitive 
correctness/consistency. A number of recent changes have tilted in favor of 
intuitive correctness and consistency: LUCENE-8477, LUCENE-8531, LUCENE-9207. I 
wonder whether the performance implications of these changes are effectively 
evaluated in benchmarks? I'm wondering this not with a view to second-guessing 
decisions, but simply hoping to document/quantify the downsides of presumably 
justified tradeoffs; and thinking in a more forward-looking, positive sense: to 
establish a baseline for a use-case that we know could be ripe for optimization.

> Move span queries to the queries module
> ---------------------------------------
>
>                 Key: LUCENE-9204
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9204
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Alan Woodward
>            Assignee: Alan Woodward
>            Priority: Major
>             Fix For: main (9.0)
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> We have a slightly odd situation currently, with two parallel query 
> structures for building complex positional queries: the long-standing span 
> queries, in core; and interval queries, in the queries module.  Given that 
> interval queries solve at least some of the problems we've had with Spans, I 
> think we should be pushing users more towards these implementations.  It's 
> counter-intuitive to do that when Spans are in core though.  I've opened this 
> issue to discuss moving the spans package as a whole to the queries module.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to