You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pylucene-dev@lucene.apache.org by Ian McCullough <py...@ipmcc.com> on 2011/03/14 01:57:24 UTC

Use JCC wrapper from C++ (no python)

Hello all,

I'm curious how closely tied the JCC/Lucene wrappers are to Python. I've
been looking for a way to use Lucene from C/C++.  I'm aware of CLucene, but
it appears to have some serious issues, and I was pointed to PyLucene. Is it
conceivable that one could use the JCC-generated code from C/C++ in the
absence of Python? Or is the JCC code closely tied to the Python interfaces
to use without heavy modification?

Thanks,
Ian

Re: Use JCC wrapper from C++ (no python)

Posted by Andi Vajda <va...@apache.org>.
On Mar 14, 2011, at 1:57, Ian McCullough <py...@ipmcc.com> wrote:

> Hello all,
> 
> I'm curious how closely tied the JCC/Lucene wrappers are to Python. I've
> been looking for a way to use Lucene from C/C++.  I'm aware of CLucene, but
> it appears to have some serious issues, and I was pointed to PyLucene. Is it
> conceivable that one could use the JCC-generated code from C/C++ in the
> absence of Python? Or is the JCC code closely tied to the Python interfaces
> to use without heavy modification?

JCC in fact generates two layers of wrappers, C++ to JNI and CPython types to C++. If you don't specify --python on the JCC command line no python wrappers nor python support code is generated. 
So yes, this is possible and even intended. That being said no one has used it that way yet and some digging and programming is going to be necessary, for example with regards to the JVM and JNI init code. 

Feel free to ask questions on this list but be prepared to familiarize yourself with the JNI side of things. 

Andi..

> 
> Thanks,
> Ian