# API towards cFerret

**URL:** <https://www.ruby-forum.com/t/api-towards-cferret/106878>\
**Category:** Ferret\
**Created:** [June 14, 2007, 10:59pm UTC](https://www.ruby-forum.com/t/api-towards-cferret/106878 "2007-06-14T22:59:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cubiq](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/b19c9b/32.png) [@cubiq](https://www.ruby-forum.com/u/cubiq)\
**Post date:** [June 14, 2007, 10:59pm UTC](https://www.ruby-forum.com/t/api-towards-cferret/106878/1 "2007-06-14T22:59:07Z")

</div>

Hello list,

I know this is a little OT but I wonder how I would go about using  
cFerret directly through C/C++ for indexing.

Right now I do

index = Index::Index.new(:path =\> ‘/path/to/index’)

index \<\< {:title =\> “Programming Ruby”, :content =\> “blah blah blah”}

How would I do this in C/C++ against cFerret?

Thanks!

//Henrik

---

<div class="post-metadata">

**Author:** ![cubiq](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/b19c9b/32.png) [@cubiq](https://www.ruby-forum.com/u/cubiq)\
**Post date:** [June 15, 2007, 9:53am UTC](https://www.ruby-forum.com/t/api-towards-cferret/106878/2 "2007-06-15T09:53:52Z")

</div>

On Thu, Jun 14, 2007 at 10:58:01PM +0200, Henrik Z. wrote:

> How would I do this in C/C++ against cFerret?

Have you had a look at Ferret’s source tree? There are c unit tests,  
maybe these help to get you started?

I think you’re the first to try this, so good luck 🙂

Jens

–  
Jens Krämer  
webit! Gesellschaft für neue Medien mbH  
Schnorrstraße 76 | 01069 Dresden  
Telefon +49 351 46766-0 | Telefax +49 351 46766-66  
removed\_email\_address@domain.invalid | [www.webit.de](http://www.webit.de)

Amtsgericht Dresden | HRB 15422  
GF Sven Haubold, Hagen Malessa

---

<div class="post-metadata">

**Author:** ![cubiq](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/b19c9b/32.png) [@cubiq](https://www.ruby-forum.com/u/cubiq)\
**Post date:** [June 16, 2007, 4:39pm UTC](https://www.ruby-forum.com/t/api-towards-cferret/106878/3 "2007-06-16T16:39:47Z")

</div>

15 jun 2007 kl. 09:52 skrev Jens K.:

> > index \<\< {:title =\> “Programming Ruby”, :content =\> “blah blah blah”}
> > 
> > How would I do this in C/C++ against cFerret?
> 
> Have you had a look at Ferret’s source tree? There are c unit tests,  
> maybe these help to get you started?

Yes I looked at these tests but instead of interfacing directly to  
the files used by the tests I would like to interface directly  
through ferret.h.

I’ll do some more research and start to do some coding to see what I  
come up with. Just wanted to see if anyone already had done it. 🙂

> I think you’re the first to try this, so good luck 🙂

Thanks! 🙂
