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

Dawid Weiss commented on SOLR-16059:
------------------------------------

I left the PR at 
[https://github.com/apache/solr/pull/712|https://github.com/apache/solr/pull/712.]

It corrects two real bugs but went unnoticed because people will never use 
offsets with this analyzer and most Reader implementations do in fact read 
fully (even if they're not required to).

The existing code is buggy though, perhaps it's worth fixing, even if it's not 
used anywhere within Solr (I discovered this when I worked on a custom 
extension).

> FieldType.DefaultAnalyzer issues incorrect final offset (and has broken 
> buffer read)
> ------------------------------------------------------------------------------------
>
>                 Key: SOLR-16059
>                 URL: https://issues.apache.org/jira/browse/SOLR-16059
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Dawid Weiss
>            Assignee: Dawid Weiss
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> FieldType.DefaultAnalyzer (used as a default in many field types) has a 
> broken implementation that doesn't finalize the offset attribute. It also 
> uses an incorrect assumption that reader.read(buffer, offset, length) is 
> always reading fully up until length (it is not required to).



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to