[
https://issues.apache.org/jira/browse/SOLR-4481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13583738#comment-13583738
]
Hoss Man commented on SOLR-4481:
--------------------------------
Feedback from jan on twitter...
{quote}
Looks good, or a more verbose: \{!switch case.yes='inStock:true'
default='foo'\}, or c.yes='…' where c short for case?
{quote}
I think using "case" instead of "s" and "default" instead of "defSwitch" makes
a lot of sense ... my initial thinking was that the parser could consult both
the localparams and the request params (before i realized that was too risky
because clients could define their own cases) so i wanted the param names to be
clearly related to "switch".
My chief concern is about the difference between the "blank" case, and the
"default" case when nothing matches, and wether people will be confused by the
difference in meaning. ie: is it obvious to folks at a glance what each of
these produce...
{noformat}
{!switch case=XXX case.foo=YYY case=ZZZ default=QQQ v=' '} //
XXX
{!switch case=XXX case.foo=YYY case=ZZZ default=QQQ v='case'} //
QQQ
{noformat}
...is that confusing? would it perhaps be better to have an explicit "blank"
(or "empty" param name instead of using "case" as both a prefix & a param?
> SwitchQParserPlugin
> -------------------
>
> Key: SOLR-4481
> URL: https://issues.apache.org/jira/browse/SOLR-4481
> Project: Solr
> Issue Type: New Feature
> Reporter: Hoss Man
> Assignee: Hoss Man
> Attachments: SOLR-4481.patch
>
>
> Inspired by a conversation i had with someone on IRC a while back about using
> "append" fq params + local params to create custom request params, it
> occurred to me that it would be handy to have a "switch" qparser that could
> be configured with some set of fixed "switch case" localparams that it would
> delegate too based on it's input string.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]