[
https://issues.apache.org/jira/browse/SOLR-3175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218892#comment-13218892
]
Hoss Man commented on SOLR-3175:
--------------------------------
Suggested approach:
* replace the {{if (c == 'x' || c == 'y' || ... )}} meme with a Set<Character>
lookup
* make the Set used in each case public static final
* add a unit test that asserts the maps are equivilent when they are suppose to
be equivilent, or supersets when they are suppose to be supersets.
> simplify & add test to ensure various query "escape" functions are in sync
> --------------------------------------------------------------------------
>
> Key: SOLR-3175
> URL: https://issues.apache.org/jira/browse/SOLR-3175
> Project: Solr
> Issue Type: Improvement
> Reporter: Hoss Man
>
> We have three query syntax escape related functions (that i know) of that
> can't be refactored...
> * QueryParser.escape
> ** canonical
> * ClientUtils.escapeQueryChars
> ** part of solrj, doesn't depend directly on QueryParser so that Solr clients
> on't need the query parser jar locally
> * SolrPluginUtils.partialEscape
> ** designed to be a negative subset of the full set (ie: all chars except
> +/-/")
> ...we should figure out a way to assert in our tests that these are all in
> agreement (or at least as much as they are ment to be)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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]