• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
SearchKit and SKIndexDocumentIterator
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SearchKit and SKIndexDocumentIterator


  • Subject: SearchKit and SKIndexDocumentIterator
  • From: Sebastian Krauß <email@hidden>
  • Date: Fri, 28 Nov 2003 13:50:40 +0100

Hello everybody,

so, I started using SearchKit. Indexing and searching works fine.
However, I need to iterate over all documents in an index. What I'm currently doing is this:

// "index" is a valid reference to an index of documents
SKDocumentRef docRef = SKIndexCopyDocumentForDocumentID(index, SKIndexGetMaximumDocumentID(index));
SKIndexDocumentIteratorRef iterator = SKIndexDocumentIteratorCreate(index, docRef);

SKDocumentRef thisDoc = SKIndexDocumentIteratorCopyNext(iterator);

while (thisDoc != NULL)
{
// Do something with the document
CFRelease(thisDoc);
thisDoc = SKIndexDocumentIteratorCopyNext(iterator);
}

For clarification: I use SKIndexGetMaximumDocumentID() because this is the only function I could find to get a reference to a concrete document. I also tried NULL as an argument to SKIndexDocumentIteratorCreate(), but whatever I do, it iterates over _exactly one_ document, though SKIndexGetDocumentCount() returns 400 which seems about right.

Is there another way to get references to all documents in an index? Or can anybody tell me what I'm doing wrong?

Any help is very much appreciated, I'm somewhat desperate.

Sebastian
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Comparing two images
  • Next by Date: Catching JNI exception in Objective C
  • Previous by thread: Re: Comparing two images
  • Next by thread: Catching JNI exception in Objective C
  • Index(es):
    • Date
    • Thread