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

Robert Muir updated LUCENE-3526:
--------------------------------

    Attachment: LUCENE-3526_test.patch

ok, here's a patch... all tests pass now.

The assert fail in the writer was a bad assert, we previously had:
{noformat}
      // If there is a field named "" (empty string) then we
      // will get 0 on this comparison, yet, it's "OK".  But
      // it's not OK if two different field numbers map to
      // the same name.
      if (cmp != 0 || lastFieldNumber != -1)
        return cmp;
{noformat}

which is nice, but it doesn't cover the case of empty term PLUS empty string: 
Term("", ""). in this case we would fall thru and return 0, which is wrong.
                
> preflex codec returns wrong terms if you use an empty field name
> ----------------------------------------------------------------
>
>                 Key: LUCENE-3526
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3526
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>         Attachments: LUCENE-3526.patch, LUCENE-3526_test.patch, 
> LUCENE-3526_test.patch, LUCENE-3526_test.patch, LUCENE-3526_test.patch
>
>
> spinoff from LUCENE-3473.
> I have a standalone test for this... the termsenum is returning a bogus extra 
> empty-term (I assume it has no postings, i didnt try).
> This causes the checkindex test in LUCENE-3473 to fail, because there are 4 
> terms instead of 3. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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