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

David Smiley commented on SOLR-6318:
------------------------------------

I've read somewhere (in the Lucene source, I forget) that BooleanQuery was 
shown to be faster than TermsFilter when the number of terms is less than some 
number, based on a bunch of assumptions of course.  It would be nice to have a 
threshold option to switch between BooleanQuery & TermsFilter.  I've also seen 
a suggestion that TermsFilter should use or be replaced by AutomatonQuery 
LUCENE-3893.  It would be easy to use any of these options.

> QParser for TermsFilter
> -----------------------
>
>                 Key: SOLR-6318
>                 URL: https://issues.apache.org/jira/browse/SOLR-6318
>             Project: Solr
>          Issue Type: New Feature
>          Components: query parsers
>            Reporter: David Smiley
>            Assignee: David Smiley
>             Fix For: 4.10
>
>
> Some applications require filtering documents by a large number of terms.  
> It's often related to security filtering.  Naively this is done this way:
> {noformat}
>     fq={!df=myfield q.op=OR}code1 code2 code3 code4 code5...
> {noformat}
> And this ends up being a BooleanQuery.  Users then wind up hitting 
> BooleaQuery.maxClauseCount (sometimes in production, sadly) and they up it to 
> a huge number to get the job done.
> Solr should offer a QParser based on TermsFilter.  I propose it be named 
> "terms" (plural of term), and have a "separator" option defaulting to a 
> space.  When it's a space, the values also get trimmed, which wouldn't 
> otherwise happen.  The analysis logic should be the same as that for "term" 
> QParser which is to call FieldType.readableToIndexed.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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

Reply via email to