Discussion:
Indexing the local file system
Huang, Zijian(Victor)
2009-03-19 18:12:30 UTC
Permalink
Hi, all:
I am new to Ferret, can anyone please tell me what do I do to index
some text files in a local directory?

Thanks

Victor
Hugh Sasse
2009-03-19 18:42:52 UTC
Permalink
Post by Huang, Zijian(Victor)
I am new to Ferret, can anyone please tell me what do I do to index
some text files in a local directory?
I got started with the book (not to hand) and modifying some code, which
I then put here:
http://www.cse.dmu.ac.uk/~hgs/ruby/#ff.rb

Hopefully that will do most of what you want.
Post by Huang, Zijian(Victor)
Thanks
Victor
Hugh
Jens Kraemer
2009-03-19 19:03:20 UTC
Permalink
Hi!
Post by Huang, Zijian(Victor)
I am new to Ferret, can anyone please tell me what do I do to
index some text files in a local directory?
Have a look at either RDig (rdig.rubyforge.org) or the FerretFinder
project (http://www.methods.co.nz/ff/) - each of these projects do
what you want (and are open source).

Or, even better, get the Ferret Book (available as PDF or in Print
from O'Reilly) for a complete reference including many examples (afair
there's also an example that deals with indexing files).

Basically it boils down to

- create new ferret index
- for each file:
- get textual content (involves conversion from pdf, word or
whatever file format to plain text)
- create ferret document with textual content and filename
- add ferret document to ferret index
- close ferret index

Cheers,
Jens


--
Jens Krämer
Finkenlust 14, 06449 Aschersleben, Germany
VAT Id DE251962952
http://www.jkraemer.net/ - Blog
http://www.omdb.org/ - The new free film database
Huang, Zijian(Victor)
2009-03-19 21:29:00 UTC
Permalink
Great!
Thanks for the helps

Vic

-----Original Message-----
From: ferret-talk-bounces-***@public.gmane.org [mailto:ferret-talk-***@rubyforge.org] On Behalf Of Jens Kraemer
Sent: Thursday, March 19, 2009 12:03 PM
To: ferret-talk-***@public.gmane.org
Subject: Re: [Ferret-talk] Indexing the local file system

Hi!
Post by Huang, Zijian(Victor)
I am new to Ferret, can anyone please tell me what do I do to
index some text files in a local directory?
Have a look at either RDig (rdig.rubyforge.org) or the FerretFinder
project (http://www.methods.co.nz/ff/) - each of these projects do
what you want (and are open source).

Or, even better, get the Ferret Book (available as PDF or in Print
from O'Reilly) for a complete reference including many examples (afair
there's also an example that deals with indexing files).

Basically it boils down to

- create new ferret index
- for each file:
- get textual content (involves conversion from pdf, word or
whatever file format to plain text)
- create ferret document with textual content and filename
- add ferret document to ferret index
- close ferret index

Cheers,
Jens


--
Jens Krämer
Finkenlust 14, 06449 Aschersleben, Germany
VAT Id DE251962952
http://www.jkraemer.net/ - Blog
http://www.omdb.org/ - The new free film database

Loading...