Hi,

I am using lucene together with other modules (all built in shared
mode, JCC=2.11). But JArray... objects are not built as shared

This works when using only lucene, but fails when I use built the
other module linked against lucene

# create array of string objects
x = j.JArray_object(5)
for i in range(5):
   x[i] = j.JArray_string(['x', 'z'])

In [7]: for i in range(5):
   x[i] = j.JArray_string(['x', 'z'])
   ...:
   ...:
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/dvt/workspace/montysolr/src/python/<ipython console> in <module>()

TypeError: JArray<string>[u'x', u'z']


The JArray functions/objects are different:

In [9]: id(lucene.JArray_string)
Out[9]: 140313957671376

In [10]: id(solr_java.JArray_string)
Out[10]: 140313919877648

In [11]: id(montysolr_java.JArray_string)
Out[11]: 140313909254704

In [12]: id(j.JArray_string)
Out[12]: 140313909254704



Others are shared:

In [18]: id(lucene.Weight)
Out[18]: 140313957203040

In [19]: id(solr_java.Weight)
Out[19]: 140313957203040

In [20]: id(j.Weight)
Out[20]: 140313957203040


The module 'j' is built with:
-m  jcc  --shared  --import  lucene  --import  solr_java  --package
org.apache.solr.request  --classpath ...  --include
../build/jar/montysolr_java-0.1.jar  --python  montysolr_java  --build
 --bdist


What am I doing wrong?

Thanks,

  roman

Reply via email to