[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Using CLucene

Oliver Cromm

10/5/2004 8:55:00 PM

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?
--
Oliver Cromm
'Conduct warfare on the most chivalrous principles,
there must ever be a touch of murder about it.'
William Howard Russell, 1860
9 Answers

Brian McCallister

10/5/2004 10:07:00 PM

0

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

On Oct 5, 2004, at 4:59 PM, Oliver Cromm wrote:

> 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?
> --
> Oliver Cromm
> 'Conduct warfare on the most chivalrous principles,
> there must ever be a touch of murder about it.'
> William Howard Russell, 1860
>
>




gabriele renzi

10/5/2004 11:16:00 PM

0

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

Brian McCallister

10/5/2004 11:27:00 PM

0

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

-Brian

On Oct 5, 2004, at 7:19 PM, gabriele renzi wrote:

> 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
>
>




vruz

10/6/2004 12:03:00 AM

0

> 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/...

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,



--
--- vruz


Brian McCallister

10/6/2004 1:02:00 AM

0

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

-Brian

On Oct 5, 2004, at 8:03 PM, vruz wrote:

>> 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/...
>
> 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,
>
>
>
> --
> --- vruz
>
>




vruz

10/6/2004 2:38:00 AM

0

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

sorry, I didn't see Erik in this thread

best,


Martin DeMello

10/6/2004 7:06:00 AM

0

Brian McCallister <mccallister@forthillcompany.com> wrote:
> 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

gabriele renzi

10/6/2004 10:42:00 AM

0

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.

Oliver Cromm

10/7/2004 4:32:00 PM

0

Brian McCallister wrote:

> 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.
--
Oliver Cromm
'Conduct warfare on the most chivalrous principles,
there must ever be a touch of murder about it.'
William Howard Russell, 1860