[ 
https://issues.apache.org/jira/browse/SOLR-234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495153
 ] 

Ryan McKinley commented on SOLR-234:
------------------------------------

> 
> Updating the offsets does seem like the right thing to do.
> 

My real use case is adding the the trim filter to the pattern tokenizer.  the 
'correct' answer in my case it to update the offsets.

The case i can imagine leading to something like SOLR-42 is if a token is 
replaced with something that has leading or trailing spaces.  

Perhaps we could add a parameter to the factory:

 <filter class="solr.TrimFilterFactory" updateOffests="true" />

To limit SOLR-42 style errors, the default could be false.


> 
> Isn't it annoying that Java never seems to let you do things as efficiently 
> as the class lib itself...
> 

*especially* for strings!

> TrimFilter should update the start and end offsets
> --------------------------------------------------
>
>                 Key: SOLR-234
>                 URL: https://issues.apache.org/jira/browse/SOLR-234
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Ryan McKinley
>            Priority: Minor
>         Attachments: SOLR-234-TrimFilterOffsets.patch
>
>
> As implemented, the TrimFilter only trims the text.  It does not update the 
> the startOffset and endOffset
> see:
> http://www.nabble.com/TrimFilter----t.startOffset%28%29%2C-t.endOffset%28%29-tf3728875.html

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

Reply via email to