Am 03.09.2016, 18:34 Uhr, schrieb Andi Vajda <va...@apache.org>:

Here is how one can reproduce what I just did:
 - cd ~/apache
- git clone --branch branch_6x https://github.com/apache/lucene-solr.git lucene.6x
 - cd <pylucene dir>
 - svn update
   make sure you have a modern setuptools (if you are on linux, the
   setuptools patching done by JCC to be able to build a plain shared
   library most likely needs to be refreshed or maybe even eliminated).
 - _install/bin/pip uninstall setuptools
 - _install/bin/pip install setuptools
 - cd jcc
 - ../_install/bin/python setup.py build install
 - cd ..
- make sources (this copies the lucene tree from the github tree cloned)
 - make compile install

If all worked, you can then:
 - _install/bin/python
 >>> import lucene
 >>> lucene.initVM()
 - _install/bin/python test/test_Binary.py

I have a Python virtual env installed in pylucene/_install, this helps with keeping different versions of software separate.

 2. Volunteers should then help in porting old 4.x tests, if they still
apply, and import new tests from the current Lucene suite as they see
    fit.

All other tests need to be carefully ported to match all the numerous API changes and disappeared classes. For similar reasons, the extensions jar does not build and is not currently included in the build. Its source java classes need to be refreshed as tests get refreshed to 6.x.

PyLucene now builds and passes all its tests on Mac OS X and Linux.
It is thus in a state where a release candidate could be built and submitted for review.

A volunteer is requested to build and test PyLucene's trunk on Windows. If noone comes forward, I intend to try to release PyLucene 6.2 in a few weeks, still.

Nice Job!

I've successfully build PyLucene 6.2 on windows. Most tests pass:
* skipped the three test_ICU* due to missing "import icu"
* fixed test_PyLucene.py by ignoring open file handles (os.error) in shutil.rmtree() in Test_PyLuceneWithFSStore.tearDown()

* then stuff like these in test_PythonDirectory.py
======================================================================
ERROR: test_FieldEnumeration (__main__.PythonDirectoryTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\vls-lucene43\misc\pylucene_62\test\test_PyLucene.py", line 234, in test_FieldEnumeration
    self.test_indexDocument()
File "D:\vls-lucene43\misc\pylucene_62\test\test_PyLucene.py", line 86, in test_indexDocument
    self.closeStore(store, writer)
  File "test_PythonDirectory.py", line 254, in closeStore
    arg.close()
JavaError: <super: <class 'JavaError'>, <JavaError object>>
    Java stacktrace:
java.lang.RuntimeException: InvalidArgsError
        at org.apache.pylucene.store.PythonDirectory.deleteFile(Native Method)
at org.apache.lucene.store.LockValidatingDirectoryWrapper.deleteFile(LockValidatingDirectoryWrapper.java:38) at org.apache.lucene.index.IndexFileDeleter.deleteFile(IndexFileDeleter.java:721) at org.apache.lucene.index.IndexFileDeleter.deleteFiles(IndexFileDeleter.java:715) at org.apache.lucene.index.IndexFileDeleter.deleteNewFiles(IndexFileDeleter.java:691)
        at 
org.apache.lucene.index.IndexWriter.flushFailed(IndexWriter.java:4929)
at org.apache.lucene.index.DocumentsWriter$FlushFailedEvent.process(DocumentsWriter.java:758) at org.apache.lucene.index.IndexWriter.processEvents(IndexWriter.java:4991) at org.apache.lucene.index.IndexWriter.processEvents(IndexWriter.java:4982)
        at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:3372)
        at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:3333)
        at org.apache.lucene.index.IndexWriter.shutdown(IndexWriter.java:1117)
        at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1162)

* and this one in test_PythonException.py
======================================================================
ERROR: testThroughLayerException (__main__.PythonExceptionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_PythonException.py", line 34, in testThroughLayerException
    qp.parse("foo bar")
JavaError: <super: <class 'JavaError'>, <JavaError object>>
    Java stacktrace:
java.lang.RuntimeException: TestException
at org.apache.pylucene.queryparser.classic.PythonQueryParser.getFieldQuery_quoted(Native Method) at org.apache.pylucene.queryparser.classic.PythonQueryParser.getFieldQuery(Unknown Source) at org.apache.lucene.queryparser.classic.QueryParser.MultiTerm(QueryParser.java:585) at org.apache.lucene.queryparser.classic.QueryParser.Query(QueryParser.java:198) at org.apache.lucene.queryparser.classic.QueryParser.TopLevelQuery(QueryParser.java:187) at org.apache.lucene.queryparser.classic.QueryParserBase.parse(QueryParserBase.java:111)

--dirk

Reply via email to