FROM : Jens Alfke
DATE : Mon Mar 03 07:54:43 2008
On 2 Mar '08, at 10:09 PM, Adam P Jenkins wrote:
> I'd like to make Spotlight index individual records from my
> application, rather than whole files.
Spotlight doesn't support that yet. Its unit of granularity is whole
files.
> Some examples of this are Apple's own iCal, Address Book, and
> Mail.app. For instance if you type in someone's name in the
> Spotlight search box, in addition to files which contain that name,
> individual Address Book entries that match will show up, and
> selecting one of them will start Address Book with that address
> showing.
Mail and AB do that by creating individual files for every record, for
Spotlight to index. The ones for Address Book are stored in ~/Library/
Application Support/Address Book/Metadata/.
You can do the same thing yourself. It doesn't even matter what kind
of data is in the files, as long as your importer knows how to read
them. (For example, the AB files aren't vCards, just property lists
containing the metadata.) Of course you have to keep these files and
their contents in sync with your real database, which can be a pain.
—Jens
DATE : Mon Mar 03 07:54:43 2008
On 2 Mar '08, at 10:09 PM, Adam P Jenkins wrote:
> I'd like to make Spotlight index individual records from my
> application, rather than whole files.
Spotlight doesn't support that yet. Its unit of granularity is whole
files.
> Some examples of this are Apple's own iCal, Address Book, and
> Mail.app. For instance if you type in someone's name in the
> Spotlight search box, in addition to files which contain that name,
> individual Address Book entries that match will show up, and
> selecting one of them will start Address Book with that address
> showing.
Mail and AB do that by creating individual files for every record, for
Spotlight to index. The ones for Address Book are stored in ~/Library/
Application Support/Address Book/Metadata/.
You can do the same thing yourself. It doesn't even matter what kind
of data is in the files, as long as your importer knows how to read
them. (For example, the AB files aren't vCards, just property lists
containing the metadata.) Of course you have to keep these files and
their contents in sync with your real database, which can be a pain.
—Jens
| Related mails | Author | Date |
|---|---|---|
| Adam P Jenkins | Mar 3, 07:09 | |
| Jens Alfke | Mar 3, 07:54 | |
| Adam P Jenkins | Mar 3, 14:50 | |
| Jens Alfke | Mar 3, 22:59 |






Cocoa mail archive

