Forum: Ruby on Rails Ferret questions

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
22580f640e491f0920a192610d1df393?d=identicon&s=25 Tom Davies (Guest)
on 2005-12-16 16:57
(Received via mailing list)
Hi,

I am just getting started with Ferret, but I have a couple of
questions.  Any help is appreciated.

1) Will the current Ferret implementation only work on one server due
to the index file?  If it will work on multiple servers, could you
point me towards some documentation?  If not, are there plans to add
support in the future?

2) This may not be Ferret-specific, but if I were implementing tags
similar to del.icio.us, can Ferret help in determining associations?
In other words, if I added a bunch of space-separated tags for each
index entry, how could I find similar tags given one tag?

3) This is also a tag related question.... if I add a created_date
field in the index for the tags, and I wanted to display the number of
tags, plus the number of recently added tags, should I just hit the
index twice?  As in, once with no conditions, and once with a > some
date condition?

Thanks,
Tom
B5e329ffa0cc78efbfc7ae2d084c149f?d=identicon&s=25 David Balmain (Guest)
on 2005-12-17 02:29
(Received via mailing list)
On 12/17/05, Tom Davies <atomgiant@gmail.com> wrote:
> Hi,
>
> I am just getting started with Ferret, but I have a couple of
> questions.  Any help is appreciated.
>
> 1) Will the current Ferret implementation only work on one server due
> to the index file?  If it will work on multiple servers, could you
> point me towards some documentation?  If not, are there plans to add
> support in the future?

Currently there is no support for this. But I don't think it would be
too hard to had. You'd have to look how Lucene handles this. Check out
the ParellelMultiSearcher and RemoteSearchable classes. Or you could
wait until I get around to it. I can't make any promises.

> 2) This may not be Ferret-specific, but if I were implementing tags
> similar to del.icio.us, can Ferret help in determining associations?
> In other words, if I added a bunch of space-separated tags for each
> index entry, how could I find similar tags given one tag?

Again, Ferret doesn't have support for this directly but it wouldn't
be to hard to add. Look at Lucene's MoreLikeThis class in the contrib
section;

http://svn.apache.org/viewcvs.cgi/lucene/java/trun...

Or again, you could wait until I get around to it.

> 3) This is also a tag related question.... if I add a created_date
> field in the index for the tags, and I wanted to display the number of
> tags, plus the number of recently added tags, should I just hit the
> index twice?  As in, once with no conditions, and once with a > some
> date condition?

Yes, that sounds like the right way to go about it. If every document
in the index represents one tag you could just use the
Index::Index#size method but otherwise you'll want to do two queries.

HTH,
Dave
22580f640e491f0920a192610d1df393?d=identicon&s=25 Tom Davies (Guest)
on 2005-12-17 13:38
(Received via mailing list)
Thanks Dave.  I currently don't need a multi-server index, but in the
future I hope to if my site is successful :)

I will take a look at Lucene's MoreLikeThis once I have a bit of time,
and if I come up with something useful before you do, I will pass it
your way.

Thanks,
Tom
This topic is locked and can not be replied to.