Using CLucene

O

Oliver Cromm

As Lucene is not ported yet to Ruby, can I use CLucene (or another
version) for the time being?

I'm not a Real Programmer[TM] and don't have an idea about how you call
C++ from Ruby (I can't use gcc without explicit instructions, so
README.EXT is quite a hard read for me). It seems that you have to
write some kind of 'wrapper'.

Or does that amount to 'porting Lucene to Ruby' already?
 
B

Brian McCallister

I am looking to do the same thing, but fwiw, calling C (haven't tried
C++) from ruby is pretty straightforward via ruby/dl. Not sure how
straightforward CLucene's api is for this, though.

I won't have a chance to hack around before I leave on vacation later
this week, but once I hack around a bit will post my results.

-Brian
 
G

gabriele renzi

Oliver Cromm ha scritto:
As Lucene is not ported yet to Ruby, can I use CLucene (or another
version) for the time being?

I'm not a Real Programmer[TM] and don't have an idea about how you call
C++ from Ruby (I can't use gcc without explicit instructions, so
README.EXT is quite a hard read for me). It seems that you have to
write some kind of 'wrapper'.

Or does that amount to 'porting Lucene to Ruby' already?

well, you can use the ruby/dl module to wrap c libraries withouth c, in
pure ruby.. maybe this helps
 
B

Brian McCallister

The other option is to take the PyLucene work and make a SWIG interface
file for Ruby... getting CLucene to build is... entertaining ;-)

-Brian

Oliver Cromm ha scritto:
As Lucene is not ported yet to Ruby, can I use CLucene (or another
version) for the time being? I'm not a Real Programmer[TM] and don't
have an idea about how you call C++ from Ruby (I can't use gcc
without explicit instructions, so README.EXT is quite a hard read for
me). It seems that you have to write some kind of 'wrapper'. Or does
that amount to 'porting Lucene to Ruby' already?

well, you can use the ruby/dl module to wrap c libraries withouth c,
in pure ruby.. maybe this helps
 
V

vruz

I'm not a Real Programmer[TM] and don't have an idea about how you call
C++ from Ruby (I can't use gcc without explicit instructions, so
README.EXT is quite a hard read for me). It seems that you have to
write some kind of 'wrapper'.

Or does that amount to 'porting Lucene to Ruby' already?

There's a Ruby/Lucene project by Erik Hatcher, but it seems to be
stalled, no releases so far, only available thorough cvs at:
http://rubyforge.org/projects/rubylucene

Maybe you should mail Erik and ask him if he's still interested for
team-up or you to take over.
It'd be nice to have a tool like this.

Swigging and writing an extension for something like this should be
IMHO the second step after having a good understanding of how the
thing works under the hood, especially if you claim not to be an
experienced programmer.

Anything, but please, No py-thing, please ;-)

cheers,
 
B

Brian McCallister

Did, he is the one who suggested I look into PyLucene ;-)

-Brian

I'm not a Real Programmer[TM] and don't have an idea about how you
call
C++ from Ruby (I can't use gcc without explicit instructions, so
README.EXT is quite a hard read for me). It seems that you have to
write some kind of 'wrapper'.

Or does that amount to 'porting Lucene to Ruby' already?

There's a Ruby/Lucene project by Erik Hatcher, but it seems to be
stalled, no releases so far, only available thorough cvs at:
http://rubyforge.org/projects/rubylucene

Maybe you should mail Erik and ask him if he's still interested for
team-up or you to take over.
It'd be nice to have a tool like this.

Swigging and writing an extension for something like this should be
IMHO the second step after having a good understanding of how the
thing works under the hood, especially if you claim not to be an
experienced programmer.

Anything, but please, No py-thing, please ;-)

cheers,
 
M

Martin DeMello

Brian McCallister said:
The other option is to take the PyLucene work and make a SWIG interface
file for Ruby... getting CLucene to build is... entertaining ;-)

Is there any real advantage to using swig over ruby/dl? (Genuine
question - I don't know either way.)

martin
 
G

gabriele renzi

Brian McCallister ha scritto:
The other option is to take the PyLucene work and make a SWIG interface
file for Ruby... getting CLucene to build is... entertaining ;-)

-Brian

well, you can even do what the OSAF guy did: take the original lucene,
compile it to native code with gcj, then use python bindigns with that..

don't ask me why.
 
O

Oliver Cromm

Brian said:
I am looking to do the same thing, but fwiw, calling C (haven't
tried C++) from ruby is pretty straightforward via ruby/dl. Not
sure how straightforward CLucene's api is for this, though.

Hey, it comes in handy that I read Japanese, so I have access to the
tutorial ... I'm not going to do much soon on this, though, the whole
project I want it for (an archiving system) is lagging behind by
months.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,417
Latest member
DarrenGaun

Latest Threads

Top