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

ASF subversion and git services commented on SOLR-17195:
--------------------------------------------------------

Commit e50df5b86164ecec27f6b01d54bd18f2761be91e in solr's branch 
refs/heads/backport_SOLR-16842_to_branch_9x from Jason Gerlowski
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=e50df5b8616 ]

SOLR-17195: Add 'minPrefixLength' soft limit (#2499)

Prefix queries have a memory cost that increases in proportion with the
number of indexed terms that start with that prefix.  This can cause
stability problems, especially for short prefixes which can match a
large number of indexed-terms.

This commit introduces a new solrconfig.xml setting,
`minPrefixQueryTermLength`, similar to the existing
`maxBooleanClauses`.  This setting causes an error to be thrown any
time a prefix query is created with a prefix shorter than the configured
minumum.

The limit is set at '-1' in the default configset, essentially disabling it.  
But
users may change the value in their own configs or use the
'solr.query.minPrefixLength' property as an override.  The limit may also be
overridden on a per-query basis by providing a 'minPrefixQueryTermLength'
local param.


> Minimum prefix-length soft limit
> --------------------------------
>
>                 Key: SOLR-17195
>                 URL: https://issues.apache.org/jira/browse/SOLR-17195
>             Project: Solr
>          Issue Type: Sub-task
>          Components: query
>            Reporter: Jason Gerlowski
>            Assignee: Jason Gerlowski
>            Priority: Major
>             Fix For: main (10.0), 9.7
>
>          Time Spent: 4h 20m
>  Remaining Estimate: 0h
>
> Solr performs a prefix query by rewriting it as a (potentially) large boolean 
> or terms query, with a clause for each term in the "term dictionary" that 
> matches the prefix.  The shorter the prefix, the more expensive this can be 
> and the more likely it is to cause performance problems for users.  
> We should add a configurable soft-limit, of the type described in SOLR-17191, 
> to prevent users from unknowingly providing very-short-prefixes.
> (This may require coordination and buy-in from the Lucene project, depending 
> on implementation details.)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to