GitHub user laimis opened a pull request:

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

    Regexp fixes

    Searches that use RegExp queries were failing because RegExp implementation 
had a bug in how it dealt with simple character regular expressions. Lucene 
version makes sure to append characters based on the codepoint value, while 
.NET version was simply appending code point value that would get translated 
into string. (if code point value was set to 48 which is 0, resulting 
expression was "48" and not "0").
    
    Here is Lucene code for reference 
https://github.com/apache/lucene-solr/blob/lucene_solr_4_8_0/lucene/core/src/java/org/apache/lucene/util/automaton/RegExp.java,
 note the places it uses appendCodePoint.
    
    This fixes failures in the tests that use RegExp, e.g. 
http://teamcity.codebetter.com/viewLog.html?buildId=185033&tab=buildResultsDiv&buildTypeId=LuceneNet_Core#testNameId3978078468772906159
    
    In addition TestWildcardRandom and TestRegexpRandom were failing as they 
initialized data using incorrect value format for the decimal string. Changed 
to match what Lucene is doing (which Lucene.NET had commented out).
    


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

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

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

    https://github.com/apache/lucenenet/pull/122.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 #122
    
----
commit aea4304e743bdb4c3569f2e97795c3fec1b2f6ec
Author: Laimonas Simutis <[email protected]>
Date:   2015-03-07T12:20:36Z

    fix string format to match what Lucene is doing

commit 925c280bb1e095110c1cbc06b0d151460f1abf31
Author: Laimonas Simutis <[email protected]>
Date:   2015-03-07T12:21:09Z

    decimal values were appended when intention was to append chars

----


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to