[
https://issues.apache.org/jira/browse/SOLR-6383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shalin Shekhar Mangar updated SOLR-6383:
----------------------------------------
Attachment: SOLR-6383.patch
Thanks Alexander. We shouldn't use replaceAll directly because that will cause
the Pattern to be recompiled on each replace which is very wasteful. So I've
reverted the code to use the original getPattern method but we return the
original value if the regex doesn't match. I've added a test as well.
> regexTransformer returns no results if there is no match
> --------------------------------------------------------
>
> Key: SOLR-6383
> URL: https://issues.apache.org/jira/browse/SOLR-6383
> Project: Solr
> Issue Type: Bug
> Reporter: Alexander Kingson
> Attachments: SOLR-6383.patch, regexTransformer.patch
>
>
> When used in data-import config file to replace spaces in title with _
>
> <field column="title_underscore" regex="\s+" replaceWith="_"
> sourceColName="title" />
> regexTransformer returns empty results for titles without spaces, i.e. when
> there is no match for the regex. According to the description it is
> equivalent to replaceAll which returns string when there is no match.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]