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

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

Regarding exponential cost in the number of clauses, essentially [the same 
approach|https://github.com/apache/lucene/blob/baceb1690442c2cdd6164f1faa34d65b54786a04/lucene/core/src/java/org/apache/lucene/util/QueryBuilder.java#L568-L582]
 is taken at the moment by {{QueryBuilder.analyzeGraphPhrase(...)}}. See: 
LUCENE-8531 (v7.6+, for slop>0), LUCENE-9207 (v9.0, for all slop values).

Even with maxBooleanClauses as a safety valve, this can be problematic. This 
[recent thread|https://markmail.org/message/n4p2jmsdys6s6buo] on the solr users 
list is relevant.

[~jimczi] mentioned in a [comment on 
LUCENE-9207|https://issues.apache.org/jira/browse/LUCENE-9207?focusedCommentId=17031526#comment-17031526]
 that Elasticsearch mitigates this performance issue by disabling graph queries 
in certain cases. I initially wonder whether this might amount to disabling 
graph queries in the very cases where graph queries would be most useful? That 
said, I suppose a similar approach could indeed be prudent in Solr, pending a 
solution that more directly addresses the issue. (I'm curious, but I have yet 
to go digging in the Elasticsearch code/docs to find where the disabling of 
graph queries happens, and to better understand what the tradeoffs are).

> 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