copyField can copy only part of the string but it is defined by
character count. If you want to use regular expressions, you may be
better off to do the copy in the UpdateRequestProcessor chain instead:
http://www.solr-start.com/info/update-request-processors/#RegexReplaceProcessorFactory

What you are doing (RegEx in the chain) only affects "indexed"
representation of the text. Not the stored content. I suspect that's
not what you want.

Regards,
   Alex.
Personal: http://www.outerthoughts.com/ and @arafalov
Solr resources and newsletter: http://www.solr-start.com/ and @solrstart
Solr popularizers community: https://www.linkedin.com/groups?gid=6713853


On 31 October 2014 11:49, hschillig <mouseywi...@live.com> wrote:
> So I have a title field that is common to look like this:
>
> Personal legal forms simplified : the ultimate guide to personal legal forms
> / Daniel Sitarz.
>
> I made a copyField that is of type "title_only". I want to ONLY copy the
> text "Personal legal forms simplified : the ultimate guide to personal legal
> forms".. so everything before the "/" symbol. I have it like this in my
> schema.xml:
>
> <fieldType name="title_only" class="solr.TextField">
>     <analyzer type="index">
>         <tokenizer class="solr.KeywordTokenizerFactory"/>
>         <filter class="solr.LowerCaseFilterFactory"/>
>         <filter class="solr.EdgeNGramFilterFactory" minGramSize="4"
> maxGramSize="15" side="front" />
>         <charFilter class="solr.PatternReplaceCharFilterFactory"
> pattern="(\/.+?$)" replacement=""/>
>     </analyzer>
>     <analyzer type="query">
>         <tokenizer class="solr.KeywordTokenizerFactory"/>
>         <filter class="solr.LowerCaseFilterFactory"/>
>         <charFilter class="solr.PatternReplaceCharFilterFactory"
> pattern="(\/.+?$)" replacement=""/>
>     </analyzer>
> </fieldType>
>
> My regex seems to be off though as the field still holds the entire value
> when I reindex and restart SolR. Thanks for any help!
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Only-copy-string-up-to-certain-character-symbol-tp4166857.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to