lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (Commented) (JIRA)" <>
Subject [jira] [Commented] (SOLR-3175) simplify & add test to ensure various query "escape" functions are in sync
Date Wed, 29 Feb 2012 04:10:12 GMT


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:
>             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:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message