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

Adrien Grand commented on LUCENE-7895:
--------------------------------------

bq. It's all very well saying that these queries are slow, but it still should 
be possible to run them if there's no alternative.

Actually I wish we never added {{SpanMultiTermQueryWrapper}}. It creates a 
{{SpanTermQuery}} for every matching term without enforcing any limit, which 
makes it very trappy: you can easily end up with very slow queries or ever 
out-of-memory errors at rewrite time. Can this prefix-inside-phrase problem be 
solved at index-time instead with something like edge-ngrams? I'd be ok with 
adding hooks to {{QueryBuilder}} that make it easier to handle an index-time 
solution of this problem, but if the main use-case is to make it easier to 
create a {{SpanMultiTermQueryWrapper}}, then it feels like adding an API only 
to enable usage of a trappy query to me.

> Add hooks to QueryBuilder to allow for the construction of MultiTermQueries 
> in phrases
> --------------------------------------------------------------------------------------
>
>                 Key: LUCENE-7895
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7895
>             Project: Lucene - Core
>          Issue Type: New Feature
>            Reporter: Alan Woodward
>            Assignee: Alan Woodward
>         Attachments: LUCENE-7895.patch
>
>
> QueryBuilder currently allows subclasses to override simple term query 
> construction, which lets you support wildcard querying.  However, there is 
> currently no easy way to override phrase query construction to support 
> wildcards.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to