|
|
-
AW: AW: AW: AW: AW: PyLucene use JCC shared object by default
Thomas Koch 2012-05-04, 10:37
> > As far as I understand > > elem0 = jArray[0] -> yields python object > > > > elem0 = arrayList.get(0) -> yields wrapped Java object > > > > Not sure if that's intended. In that case the test should be fixed ,-) > > If the array is an array of object, then objects you get, including instances of > java.lang.Integer. If the array is array of int, for example, then ints you get. > Ah I see - it's that the toArray() method runs in "Python land" still while ArrayList is in JVM already, right!? (In fact the ArrayList constructor itself calls toArray() too but then inside JVM and JCC probably does the conversion to Java Objects while the Python2Java frontier is passed I guess...)
This mix of Python and Java is sometimes confusing, but that's the price you have to pay ,-)
Regards, Thomas
+
Thomas Koch 2012-05-04, 10:37
-
AW: AW: AW: AW: AW: PyLucene use JCC shared object by default
Thomas Koch 2012-05-04, 21:14
Thanks, Andi - test runs fine now.
I've another small contribution to offer: samples/java/FacetExample.py - It's a python port of the facet example in java in package org.apache.lucene.facet.example.simple (actually it's a bit simplified as the four java files are merged into one python file: SimpleIndexer.java, SimpleMain.java, SimpleSearcher.java, SimpleUtils.java).
A patch to branch3x is attached - you may want to include it (up to you of course).
Regards and have a nice weekend,
Thomas
-----Ursprüngliche Nachricht----- Von: Andi Vajda [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 3. Mai 2012 20:14 An: [EMAIL PROTECTED] Betreff: Re: AW: AW: AW: AW: PyLucene use JCC shared object by default ...
I fixed your patch to use cast() so as to unbox the boxed primitive types (and strings) to resolve the failures.
Thank you for the patch, it's now checked in.
Andi..
+
Thomas Koch 2012-05-04, 21:14
-
Re: AW: AW: AW: AW: AW: PyLucene use JCC shared object by default
Andi Vajda 2012-05-04, 21:36
On Fri, 4 May 2012, Thomas Koch wrote:
> Thanks, Andi - test runs fine now. > > I've another small contribution to offer: samples/java/FacetExample.py - > It's a python port of the facet example in java in package > org.apache.lucene.facet.example.simple (actually it's a bit simplified as > the four java files are merged into one python file: SimpleIndexer.java, > SimpleMain.java, SimpleSearcher.java, SimpleUtils.java). > > A patch to branch3x is attached - you may want to include it (up to you of > course). > > Regards and have a nice weekend,
Oh cool. Just before I was going to start the release process. Thanks !
Andi..
> > Thomas > > -----Urspr�ngliche Nachricht----- > Von: Andi Vajda [mailto:[EMAIL PROTECTED]] > Gesendet: Donnerstag, 3. Mai 2012 20:14 > An: [EMAIL PROTECTED] > Betreff: Re: AW: AW: AW: AW: PyLucene use JCC shared object by default > ... > > I fixed your patch to use cast() so as to unbox the boxed primitive types > (and strings) to resolve the failures. > > Thank you for the patch, it's now checked in. > > Andi.. >
+
Andi Vajda 2012-05-04, 21:36
|
|