[ 
https://issues.apache.org/jira/browse/LUCENE-5444?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

britta weber updated LUCENE-5444:
---------------------------------

    Attachment: LUCENE-5444.patch

Thanks a lot for the quick response!
Here is a new patch with the requested changes.

I added a method setOffsetGap(..) and getOffsetGap() to MockAnalyzer and now 
set the offsetGap random in the test, which sort of tests the gapOffset as 
well. I did not add a separate test for the offsetGap though. Can you hint at 
what exactly I should be testing?

Also, I found that the String parameter for 
MockAnalyzer.setPositionIncrementGap is not really used. I added it to  
setOffsetGap for consistency but it makes no sense. Should it be removed?

I close everything now that has a close method. I am now a little surprised 
that the missing closes caused no test failure in the original patch. Could 
this be a problem?

> offsets in MemoryIndex broken when adding field with more than once
> -------------------------------------------------------------------
>
>                 Key: LUCENE-5444
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5444
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 4.6.1
>            Reporter: britta weber
>            Assignee: Simon Willnauer
>            Priority: Minor
>              Labels: easyfix
>             Fix For: 5.0, 4.7
>
>         Attachments: LUCENE-5444.patch, LUCENE-5444.patch
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> When fields with the same name are added more than once to MemoryIndex, the 
> offsets of the previous additions of the field do not seem to be taken into 
> account. As a result, MemoryIndex cannot be used for example with the vector 
> highlighter. 



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

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

Reply via email to