[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Trying to open a Lucene-built index with Ferret...

John Pritchard-williams

11/2/2008 10:03:00 PM

But its wipes out the existing index and creates a new empty one - the
pages for Ferret are currently unavailable - just wondering anybody else
has come across this? Is the 'create=>false' just not working or do I
have it wrong here ? ( I have also tried : create=>'false' - still the
same thing).

Cheers

John

How do I get the version of Ferret I'm using by the way - I would have
posted that here if I knew how !

-- Search.rb --
require 'rubygems'
require 'ferret'

index=Ferret::I.new(:path => 'index', :create=>false);
index.search_each('thane') do |doc,score|
puts doc, score
end
index.close
-- end
--
Posted via http://www.ruby-....

12 Answers

Florian Gilcher

11/2/2008 10:20:00 PM

0

As far as i know, Ferret-built indexes are not binary-compatible with
Lucene anymore.

To find out the version, open a console and type:

gem list ferret

the highest version behind the ferret gem is the one in use.

Regards,
Florian Gilcher

On Nov 2, 2008, at 11:03 PM, John Pritchard-williams wrote:

> But its wipes out the existing index and creates a new empty one - the
> pages for Ferret are currently unavailable - just wondering anybody
> else
> has come across this? Is the 'create=>false' just not working or do I
> have it wrong here ? ( I have also tried : create=>'false' - still
> the
> same thing).
>
> Cheers
>
> John
>
> How do I get the version of Ferret I'm using by the way - I would have
> posted that here if I knew how !
>
> -- Search.rb --
> require 'rubygems'
> require 'ferret'
>
> index=Ferret::I.new(:path => 'index', :create=>false);
> index.search_each('thane') do |doc,score|
> puts doc, score
> end
> index.close
> -- end
> --
> Posted via http://www.ruby-....
>


John Pritchard-williams

11/2/2008 10:45:00 PM

0

Thanks Florian, that would be shame if we've lost that binary
compatibility ah well...

The version is:

*** LOCAL GEMS ***

ferret (0.11.6, 0.11.4)

And ignoring the Lucene/Ferret thing for the moment - the 'search.rb'
program above seems to write over the index directory in any case (if I
run it twice , I get new mod times on the 'segments' files at least).

Cheers

John

--
Posted via http://www.ruby-....

Florian Gilcher

11/2/2008 11:57:00 PM

0

I don't remember the reasoning behind it, but as far as i know, this
happend quite a while ago.

If you search http://www.ruby-forum.c... for it, you might get
more.

I think the ability to use Lucene directly from JRuby already makes
the ability to manipulate it
with ferret a cornercase most people will ignore.

Regards,
Florian Gilcher

On Nov 2, 2008, at 11:45 PM, John Pritchard-williams wrote:

> Thanks Florian, that would be shame if we've lost that binary
> compatibility ah well...
>
> The version is:
>
> *** LOCAL GEMS ***
>
> ferret (0.11.6, 0.11.4)
>
> And ignoring the Lucene/Ferret thing for the moment - the 'search.rb'
> program above seems to write over the index directory in any case
> (if I
> run it twice , I get new mod times on the 'segments' files at least).
>
> Cheers
>
> John
>
> --
> Posted via http://www.ruby-....
>


Hugh Sasse

11/3/2008 12:24:00 PM

0

On Mon, 3 Nov 2008, John Pritchard-williams wrote:
> And ignoring the Lucene/Ferret thing for the moment - the 'search.rb'
> program above seems to write over the index directory in any case (if I
> run it twice , I get new mod times on the 'segments' files at least).

I have not explicitly checked for this behaviour with the ff.rb
I modified (without touching that bit), but certainly the index is not
rebuilt, that would take ages.
http://www.eng.cse.dmu.ac.uk/~hgs/...
http://www.eng.cse.dmu.ac.uk/~hgs/ruby/ferret...
See
http://www.eng.cse.dmu.ac.uk/~hgs/r...
for a bit of blurb about what I did.
You might like to experiment with that to see if its behaviour is useful.

[For those reading the archive: that machine is doomed to die, and the
URL will change. I'd like to keep this stuff on the web somewhere, but
I'm not sure how that will work out]

Hugh

poisoned rose

11/3/2010 7:21:00 PM

0

"Raja, The" <zepfloyes@yahoo.com> wrote:

> Only pretend critics will laud the silly Tomorrow Never Know with its
> pseudo-psychedelic silly sounds.

Though clearly, there's at least one pretend critic who doesn't like it.

Ivan Maximus Lendl

11/3/2010 7:38:00 PM

0

On Nov 3, 2:21 pm, poisoned rose <pro...@wipingbottoms.com> wrote:
> "Raja, The" <zepflo...@yahoo.com> wrote:
> > Only pretend critics will laud the silly Tomorrow Never Know with its
> > pseudo-psychedelic silly sounds.
>
> Though clearly, there's at least one pretend critic who doesn't like it.

I am not a critic by any means. I have my likes and dislikes. Everyone
does.

JohnB

11/3/2010 10:51:00 PM

0

On Nov 3, 6:02 pm, "Raja, The Great" <zepflo...@yahoo.com> wrote:
<snip>
>
> You dont have to like/dislike the same song as I. I am not an
> authority on songs. Chill... I start threads for discussion, not for
> insulting people. You guys take it too seriously.
>

You say this but don't recognise a wind up?

Funny how it goes: you start a thread, usually by posting a list or a
"favourites" request or such-and-such was better than so-and-so, then
when people respond with opinions that don't match yours, you throw
insults at them. So you get a bit back. Who needs to chill? I think
it's you.

Rock FZYGC

11/4/2010 12:05:00 AM

0

On Nov 3, 5:51 pm, JohnB <johnbo...@tinyworld.co.uk> wrote:
> On Nov 3, 6:02 pm, "Raja, The Great" <zepflo...@yahoo.com> wrote:
> <snip>
>
>
>
> > You dont have to like/dislike the same song as I. I am not an
> > authority on songs. Chill... I start threads for discussion, not for
> > insulting people. You guys take it too seriously.
>
> You say this but don't recognise a wind up?
>
> Funny how it goes: you start a thread, usually by posting a list or a
> "favourites" request or such-and-such was better than so-and-so, then
> when people respond with opinions that don't match yours, you throw
> insults at them. So you get a bit back. Who needs to chill? I think
> it's you.

Where in my entire post was there an insult? You are way too
sensitive.

moonpie

11/4/2010 1:42:00 PM

0

On Wed, 3 Nov 2010 15:51:12 -0700 (PDT), JohnB
<johnbooth@tinyworld.co.uk> wrote:

>On Nov 3, 6:02?pm, "Raja, The Great" <zepflo...@yahoo.com> wrote:
><snip>
>>
>> You dont have to like/dislike the same song as I. I am not an
>> authority on songs. Chill... I start threads for discussion, not for
>> insulting people. You guys take it too seriously.
>>
>
>You say this but don't recognise a wind up?
>
>Funny how it goes: you start a thread, usually by posting a list or a
>"favourites" request or such-and-such was better than so-and-so, then
>when people respond with opinions that don't match yours, you throw
>insults at them. So you get a bit back. Who needs to chill? I think
>it's you.


sometimes his trolling does get some discussion going, but it always
ends up with the same result: him, and some other mercurial characters
here, hurling insults at those that disagree with them.

JohnB

11/4/2010 1:49:00 PM

0

On Nov 4, 12:04 am, "Raja, The Great" <zepflo...@gmail.com> wrote:
> On Nov 3, 5:51 pm, JohnB <johnbo...@tinyworld.co.uk> wrote:
>
>
>
> > On Nov 3, 6:02 pm, "Raja, The Great" <zepflo...@yahoo.com> wrote:
> > <snip>
>
> > > You dont have to like/dislike the same song as I. I am not an
> > > authority on songs. Chill... I start threads for discussion, not for
> > > insulting people. You guys take it too seriously.
>
> > You say this but don't recognise a wind up?
>
> > Funny how it goes: you start a thread, usually by posting a list or a
> > "favourites" request or such-and-such was better than so-and-so, then
> > when people respond with opinions that don't match yours, you throw
> > insults at them. So you get a bit back. Who needs to chill? I think
> > it's you.
>
> Where in my entire post was there an insult? You are way too
> sensitive.

I think, of all the folks who visit this place, I am less guilty of
that than most, but, even if in this post there is little that could
be regarded as insult, generally you are fairly free with them.
Admittedly, your initial posts tend to be insult free and there are
sometimes discussions of interest further down the thread, but it's
rarely long before your attempts to defned your statements draw some
flak - and having drawn, are answered in kind.

Do you recall dismissing someone who doesn't like hard rock as a wimp?
I know several people who don't like hard rock who could make minced
meat of you. As for me, well, there's comparatively little that falls
under that heading that excites me. I am a Beatles fan because I love
melody, harmony, subtlety and quirkiness as well as good driving
rhythms and hell-for leather good time rock.