[jira] [Commented] (LUCENE-4423) DocumentStoredFieldVisitor.binaryField ignores offset and length

2012-09-25 Thread Robert Muir (JIRA)

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

Robert Muir commented on LUCENE-4423:
-

{quote}
although I am not sure whether it should be the responsability of the 
StoredFieldVisitor or of the StoredFieldsReader to make sure that the byte[] is 
a copy (this patch assumes it it the responsability of StoredFieldVisitor).
{quote}

Can we separate this? This is a different issue (there are TODOs about that). I 
definitely dont want it mixed in with this bugfix.

> DocumentStoredFieldVisitor.binaryField ignores offset and length
> 
>
> Key: LUCENE-4423
> URL: https://issues.apache.org/jira/browse/LUCENE-4423
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: core/store
>Reporter: Adrien Grand
> Attachments: LUCENE-4423.patch
>
>
> This is no problem with SimpleText and Lucene40 since in their cases, offset 
> is always 0 and length the length of the byte[] array, but it might break 
> with custom codecs.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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



[jira] [Commented] (LUCENE-4423) DocumentStoredFieldVisitor.binaryField ignores offset and length

2012-09-25 Thread Robert Muir (JIRA)

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

Robert Muir commented on LUCENE-4423:
-

+1 for the patch. 

Unrelated, its also bogus we have a Field(byte[], int, int) ctor but no
Field(byte[], int, int) setter. I guess i don't like the inconsistency:
but its all sugar for BytesRef anyway.

> DocumentStoredFieldVisitor.binaryField ignores offset and length
> 
>
> Key: LUCENE-4423
> URL: https://issues.apache.org/jira/browse/LUCENE-4423
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: core/store
>Reporter: Adrien Grand
> Attachments: LUCENE-4423.patch, LUCENE-4423.patch
>
>
> This is no problem with SimpleText and Lucene40 since in their cases, offset 
> is always 0 and length the length of the byte[] array, but it might break 
> with custom codecs.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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



[jira] [Commented] (LUCENE-4423) DocumentStoredFieldVisitor.binaryField ignores offset and length

2012-09-25 Thread Robert Muir (JIRA)

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

Robert Muir commented on LUCENE-4423:
-

Its also possible to add a test for this issue: we could do it either in 
AssertingCodec or AssertingAtomicReader,
have it copy the bytes to a new byte[] { "BOGUS" +  } and set the 
offset/length.

This way we know if any visitors are broken. (even though the current offset 
and length are superfluous imo,
we should ensure visitors respect the contract).

> DocumentStoredFieldVisitor.binaryField ignores offset and length
> 
>
> Key: LUCENE-4423
> URL: https://issues.apache.org/jira/browse/LUCENE-4423
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: core/store
>Reporter: Adrien Grand
> Attachments: LUCENE-4423.patch, LUCENE-4423.patch
>
>
> This is no problem with SimpleText and Lucene40 since in their cases, offset 
> is always 0 and length the length of the byte[] array, but it might break 
> with custom codecs.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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



[jira] [Commented] (LUCENE-4423) DocumentStoredFieldVisitor.binaryField ignores offset and length

2013-03-22 Thread Commit Tag Bot (JIRA)

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

Commit Tag Bot commented on LUCENE-4423:


[branch_4x commit] Adrien Grand
http://svn.apache.org/viewvc?view=revision&revision=1389856

LUCENE-4423: DocumentStoredFieldVisitor.binaryField ignores offset and length 
(merged from r1389850).



> DocumentStoredFieldVisitor.binaryField ignores offset and length
> 
>
> Key: LUCENE-4423
> URL: https://issues.apache.org/jira/browse/LUCENE-4423
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: core/store
>Reporter: Adrien Grand
>Assignee: Adrien Grand
> Fix For: 4.0
>
> Attachments: LUCENE-4423.patch, LUCENE-4423.patch
>
>
> This is no problem with SimpleText and Lucene40 since in their cases, offset 
> is always 0 and length the length of the byte[] array, but it might break 
> with custom codecs.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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