You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by laimis <gi...@git.apache.org> on 2015/01/25 14:56:52 UTC

[GitHub] lucenenet pull request: Merge logic fixes

GitHub user laimis opened a pull request:

    https://github.com/apache/lucenenet/pull/59

    Merge logic fixes

    This PR contains fixes for segment merging logic for numeric and binary fields. Lucene.Net port was ignoring docsWithField parameter and as a result the merged segment had incorrect values in field infos.  
    
    SegmentMerger needs to pass docsWithField downstream so that the iterators could use it to determine which value to return for byte or numeric fields. Here is the Lucene version, https://github.com/apache/lucene-solr/blob/lucene_solr_4_8_0/lucene/core/src/java/org/apache/lucene/index/SegmentMerger.java#L159, you can see how docsWithField is passed to Merge* calls.
    
    Subsequently, re-introduced docsWithField usage in DocValuesConsumer. Here is the Lucene version for reference: https://github.com/apache/lucene-solr/blob/lucene_solr_4_8_0/lucene/core/src/java/org/apache/lucene/codecs/DocValuesConsumer.java. Note how it uses docsWithField to determine if to return null or a value.
    
    And then related to that BinaryDocValuesWriter also needs to use docsWithField list to return proper BytesRef values. Here is Lucene version for reference: https://github.com/apache/lucene-solr/blob/lucene_solr_4_8_0/lucene/core/src/java/org/apache/lucene/index/BinaryDocValuesWriter.java
    
    Also removed commented out ports of iterators. They were taking up space and making things more confusing.
    
    You can see the tests that fail without these changes in TestLucene42DocValuesFormat or TestLucene45DocValuesFormat, but there might be more. Example failing test from TC: http://teamcity.codebetter.com/viewLog.html?buildId=179687&tab=buildResultsDiv&buildTypeId=LuceneNet_Core#testNameId7364447424024347711

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/laimis/lucenenet merge_logic_fixes

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/lucenenet/pull/59.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #59
    
----
commit 4edb41be48fc2bd73c7ce9260ac7ec692b6861ed
Author: Laimonas Simutis <la...@gmail.com>
Date:   2015-01-25T12:36:37Z

    match Lucene logic for merging values

commit 9776c7060c33b65c35b8b55af1d9b9177432cca4
Author: Laimonas Simutis <la...@gmail.com>
Date:   2015-01-25T12:43:40Z

    merge with upstream/head, fix conflicts

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] lucenenet pull request: Merge logic fixes

Posted by eladmarg <gi...@git.apache.org>.
Github user eladmarg commented on the pull request:

    https://github.com/apache/lucenenet/pull/59#issuecomment-71432169
  
    awesome! I knew there is a bug in the segments, but couldn't find it, thanks :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] lucenenet pull request: Merge logic fixes

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/lucenenet/pull/59


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---