Citát Yen-Ju Chen <[EMAIL PROTECTED]>:

> On 5/16/05, Stefan Urbanek <[EMAIL PROTECTED]> wrote:
> > On Mon, 2005-05-16 at 12:11 -0700, Yen-Ju Chen wrote:
> > > On 5/16/05, Stefan Urbanek <[EMAIL PROTECTED]> wrote:
> > > > Hi,
> > > >
> > > > Can someone fill in some Objective C examples (snippets of code) for
> the Lucene
> > > > Kit on the wiki pages? Here are some "requirements"
> > > >
> > > >
> http://dromasoftware.com/etoile/mediawiki/index.php?title=Talk:LuceneKit
> > >
> > >   I don't have any example yet because it is not finished yet.
> > >   But you can look at the test units to get some ideas,
> > >   especially in Source/Search/TestBoolean*.m
> > >   I will put some examples once LuceneKit is ready.
> 
>   I put an example under Etoile/Developer/Examples/LuceneKitExample/
>   It should help a little.
> 

Great! Thank you :) I have looked at it through web-cvs, as I am at work at the
moment.

If I understand it correctly, then the LuceneKit is used as follows:
1. create an index repository (LC*Directory)
2. index "documents" by providing indexable fields
3. search by using queries. query is term + occurence type

Now, if I would like to index any Objective-C objects I just create a LCDocument
for each object and LCField for each indexable attribute (ivar). Right?

Also, what is stored in the LCDocument object? full contents of the attribute?
Say I have a long NSAttributedString. I do:

field = [[LCField alloc] initWithName: @"content"
                           string: [myAttrString string]
                            store: LCStore_NO
                            index: LCIndex_Tokenized];

Is it stored there or the contents is used only for indexing? Or is it what the
LCStore_NO says?

Thank you,

Stefan Urbanek
--
http://stefan.agentfarms.net

First they ignore you, then they laugh at you, then they fight you, then
you win.
- Mahatma Gandhi

Reply via email to