You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Steve Rowe (JIRA)" <ji...@apache.org> on 2014/05/11 00:12:32 UTC
[jira] [Commented] (SOLR-6015) managed synonyms don't gracefully
handle lowercasing
[ https://issues.apache.org/jira/browse/SOLR-6015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13993017#comment-13993017 ]
Steve Rowe commented on SOLR-6015:
----------------------------------
Tim,
The approach looks great - cool that all ignoreCase changes are now supported.
Two things I noticed:
* One optimization you might consider in {{CasePreservingSynonymMappings.getMappings()}}: in the (very likely overwhelmingly ordinary) case of only one cased version of a key, you could just return the mappings from {{CasePreservingSynonymMappings}} rather than copying them to a new map, since no merging will be required.
* You can drop the overridden {{ManagedSynonymFilterFactory.updateInitArgs()}}, since it just calls the superclass method of the same name (after validating params, which the superclass method also does).
> managed synonyms don't gracefully handle lowercasing
> ----------------------------------------------------
>
> Key: SOLR-6015
> URL: https://issues.apache.org/jira/browse/SOLR-6015
> Project: Solr
> Issue Type: Bug
> Reporter: Yonik Seeley
> Assignee: Timothy Potter
> Attachments: SOLR-6015.patch
>
>
> I've been having bad luck testing new functionallity lately - the first thing I try never works ;-)
> {code}
> /opt/code/lusolr48/solr/example/solr/collection1/conf$ curl -XPUT "http://localhost:8983/solrsis/synonyms/english" -H 'Content-type:application/json' --data-binary '{"MB":["MiB","Megabyte"]}'
> {
> "responseHeader":{
> "status":500,
> "QTime":3},
> "error":{
> "msg":"Bad Request",
> "trace":"Bad Request (400) - Unsupported value null for mb; expected single value or a JSON array!\n
> [...]
> {code}
> I finally figured out that if I lowercased "MB" to "mb", then it works as expected.
> Also, it looks like because ignoreCase is true in the initArgs, everything is *stored* as lower case in the managed map (losing information). Ideally case would be preserved in the synonym file (esp if one wanted to change ignoreCase either way). I imagine stopwords may have the same issue, but I haven't checked.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org