You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2010/09/30 01:41:32 UTC

[jira] Resolved: (SOLR-2093) regular expression in PatternReplaceFilter can handle: /([^/]*)

     [ https://issues.apache.org/jira/browse/SOLR-2093?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man resolved SOLR-2093.
----------------------------

    Resolution: Not A Problem

> regular expression in PatternReplaceFilter can handle: /([^/]*)
> ---------------------------------------------------------------
>
>                 Key: SOLR-2093
>                 URL: https://issues.apache.org/jira/browse/SOLR-2093
>             Project: Solr
>          Issue Type: Bug
>          Components: Schema and Analysis
>    Affects Versions: 1.4
>         Environment: debian,JRE1.6,solr1.4
>            Reporter: Kuri Masta
>            Priority: Minor
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> Using PatternReplaceFilter i want to extract a certain word out of the URI.
> Although I now understand that I should handle this outside of Solr, the fact remains that Solr does not adequately handle regular expressions.
> Viewing the source code, I don't see any problems since it uses the java library.
> The problem:
>       <analyzer type="index">
>         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>         <filter class="solr.PatternReplaceFilterFactory"
>                         pattern="/([^/]*)/[^/]*$" replacement="$1"  replace="all" />
>       </analyzer>
> Input text:
> - a/b/c
> Expected
> - b
> Result Solr
> - ab
> An online JAVA regexp tester (http://www.regexplanet.com/simple/index.html):
> - b
> So the problem area lies at /([^/])

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org