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

Mike Sokolov commented on SOLR-2597:
------------------------------------

OK - I can extend LuceneTestCase, use its random, add can certainly a test for 
the Factory.

I'm not sure what the right package for this code is; working in Eclipse of 
course, all the jars get mushed into one giant classpath.  I guess I should 
build w/ant to see the dependency issues?  But it does sound as if it needs to 
move somewhere where solr/lib contents can be a dependent.

Apparently there is another jar you can get 
(http://woodstox.codehaus.org/stax-api-1.0.1.jar) to provide the 
javax.xml.stream package (StaX) for Java 5, but it doesn't sound as if it would 
be worth the trouble if this moves into solr land - is that right, can we rely 
on Java 6 there? 

I agree that having a static parser is distasteful, but it's a performance 
optimization.  It tends to be expensive to instantiate these parsers.  I'm not 
clear on what the object lifecycle for the XmlCharFilter is exactly - Robert 
are you saying the factory is long-lived, but the filter is not?

> XmlCharFilter
> -------------
>
>                 Key: SOLR-2597
>                 URL: https://issues.apache.org/jira/browse/SOLR-2597
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>    Affects Versions: 4.0
>            Reporter: Mike Sokolov
>         Attachments: SOLR-2597.patch
>
>
> This CharFilter processes incoming XML using the Woodstox parser, stripping 
> all non-text content and remembering offsets, just like HTMLCharFilter, but 
> respecting XML conventions like XML entities defined in a DTD.  XmlCharFilter 
> also provides the ability to exclude (and include) the content of certain 
> named elements.
> In order to compute character offsets properly when mixed line termination 
> styles are present (\r, \r\n), or when XML character entities (<, ", 
> &) are present, we require a newer version of Woodstox (4.1.1) than is 
> currently in solr/lib.  The earlier versions of the parser could not report 
> these entity events, so we couldn't tell the difference between "<" and 
> "&lt;" and the offsets could be wrong.  The upgraded version is in the patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to