On Nov 29, 2012, at 12:21, "Thomas Koch" <k...@orbiteam.de> wrote:
> Hi Andi, > thanks for you instructions - I meanwhile managed to install pylucene (4.0) > from trunk and started working on the test_fuzzyQuery. Will send you a patch > once I managed to update a few tests. Just wanted to let you know about > (slow) progress - sorry for late reply! Great ! Thanks ! Andi.. > > regards, > Thomas > >> -----Ursprüngliche Nachricht----- >> Von: Andi Vajda [mailto:va...@apache.org] >> Gesendet: Mittwoch, 14. November 2012 18:36 >> An: pylucene-dev@lucene.apache.org >> Betreff: Re: AW: Pylucene release >> >> >> Hi Thomas, >> >> On Wed, 14 Nov 2012, Thomas Koch wrote: >> >>> I still wanted to check the API changes related to 4.0 and could then >>> help with porting the example code (and/or unit tests). I hope there >>> are more people interested in helping to port PyLucene (or at least the >> 'related' >>> Python code) to the Lucene 4.0 level... >>> >>> How can we best proceed? >> >> 1. Pick a test that fails (for example: python test/test_FuzzyQuery.py) >> 2. Announce you're working on it on the list (so that only you does) >> 3. Fix it >> 4. Send in a patch >> >>> I assume you checked in the code that's adapted already to SVN. >> >> Yes, all current code is checked in, including fixed or broken tests. >> >>> Is there a list of code that needs to be ported (and can be used to >>> distribute tasks)? >> >> Currently, all tests in test up to test_FilteredQuery.py (alphabetically) > pass. >> The test_ICU* ones also pass. You should use these as examples on how to >> fix failing ones. >> >>> As said I don't have a an idea of the API changes yet, so it's hard to >>> estimate the time needed to get used to 4.0 >> >> No time estimated is expected from you. >> It's best to proceed by example. Look at the tests that pass already (and > thus >> that have been fixed) as examples. >> The steps to fix a failing test are as follows: >> - fix import statements first (they're all changed since PyLucene 4.0 >> no longer uses a flat namespace but strictly follows the original > Java >> package structure now) >> for example: >> from lucene import Document >> becomes >> from org.apache.lucene.document import Document >> If you don't know where a class is (and the Lucene tree is deeply >> nested), find <lucene src> -name <ClassName>.java will usually give >> you an idea of the package structure to import >> - when it makes sense (most of the time), use PyLuceneTestCase as the >> parent test class. This will help with the complexities/boilerplate > in >> creating a test IndexWriter/Reader/Searcher using a RAMDirectory >> - if the tests still fails, look at the original Java test code for >> possible changes in the API or the expected that behaviour that > occurred >> since the first port. The original Java test file is usually named >> TestName.java when the Python test is named test_Name.py >> >> Andi.. >> >>> (and fix the code), but as you did that already maybe you can share >>> your experience with us. As with any new major release (e.g. Python >>> 3.x) I guess many of us are afraid to move forward to the new release >>> and change our code base, but certainly that's just a matter of time ... >>> >>> Cheers, >>> Thomas >>> >>>> -----Ursprüngliche Nachricht----- >>>> Von: Andi Vajda [mailto:va...@apache.org] >>>> Gesendet: Dienstag, 13. November 2012 23:18 >>>> An: Shawn Grant >>>> Cc: pylucene-dev@lucene.apache.org >>>> Betreff: Re: Pylucene release >>>> >>>> >>>> Hi Shawn, >>>> >>>> On Tue, 13 Nov 2012, Shawn Grant wrote: >>>> >>>>> Hi Andi, I was just wondering if Pylucene is on its usual schedule >>>>> to release >>>>> 4-6 weeks after Lucene. I didn't see any discussion of it on the >>>>> mailing list or elsewhere. I'm looking forward to 4.0! >>>> >>>> Normally, PyLucene is released a few days after a Lucene release but >>>> 4.0 >>> has >>>> seen so many API changes and removals that all tests and samples need >>>> to be ported to the new API. Last week-end, I ported a few but lots >>>> remain to be. >>>> >>>> If no one helps, it either means that no one cares enough or that >>>> everyone >>> is >>>> willing to be patient :-) >>>> >>>> The PyLucene trunk svn repository is currently tracking the Lucene >>>> Core >>> 4.x >>>> branch and you're welcome to use it out of svn. In the ten or so unit >>> tests I >>>> ported so far, I didn't find any issues with PyLucene proper (or >>>> JCC). All changes were due to the tests being out of date or using >>>> deprecated APIs now removed. You might find that PyLucene out-of- >> trunk is quite usable. >>>> >>>> If people want to help with porting PyLucene unit tests, the ones >>>> under >>> its >>>> 'test' directory not yet ported, feel free to ask questions here. >>>> The gist of it is: >>>> - fix the imports (look at the first few tests for example, >>>> alphabetically) >>>> - fix the tests to pass by looking at the original Java tests for >>> changes >>>> as most of these tests were originally ported from Java Lucene. >>>> >>>> Once you're familiar with the new APIs, porting the sample code in >>>> samples and in LuceneInAction should fairly straightforward. It's >>>> just that there >>> is a lot >>>> to port. >>>> >>>> Andi.. >>> >>> >>> > >