[
https://issues.apache.org/jira/browse/SOLR-6318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14089888#comment-14089888
]
Yonik Seeley commented on SOLR-6318:
------------------------------------
Heh - I recently committed a TermsQParserPlugin to Heliosearch... it's syntax is
{code}
{!terms f=myfield}term1,term2,term3
{code}
Before the paint dries on this too much, perhaps we should set the default
separator to ","?
- comma separated lists of things (ids, terms, etc) are much more frequently
used in Solr in general, and I think we should try to standardize on this
- comma results in nicer to read URLs since they don't get URL encoded
- comma works better for embedded queries in lucene syntax:
{code}
A OR {!terms f=myfield}term1,term2,term3 OR C
{code}
The few things that are not comma separated now constantly trip me up... but
there are only a few of them (like edismax qf). I'm forever writing
qf=field1,field2 instead of qf=field1 field2
> 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
>
> Attachments: SOLR-6318__terms_QParser.patch
>
>
> 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]