• 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
Why does spotlight not index my text content?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why does spotlight not index my text content?


  • Subject: Why does spotlight not index my text content?
  • From: Drew McCormack <email@hidden>
  • Date: Sat, 21 May 2005 15:14:13 +0200

I have a written a spotlight plugin to add my app's document text for the key kMDItemTextContext. The plugin seems to work, because I can import document metadata with mdimport:


powerbook:~/Desktop:: mdimport -d2 /Users/drew/Desktop/Please.tsdoc            
2005-05-21 14:58:06.376 mdimport[2392] Import '/Users/drew/Desktop/Please.tsdoc' type 'com.maniacalextent.tradestrategist.tsdoc' using 'file://localhost/Applications/Trade Strategist.app/Contents/Library/Spotlight/TradeStrategistImporter.mdimporter/'
2005-05-21 14:58:06.380 mdimport[2392] Sending attributes of '/Users/drew/Desktop/Please.tsdoc' to server.  Attributes: '{
    "_kMDItemImporterCrashed" = <null>;
    "com_apple_metadata_modtime" = 138373071;
    kMDItemContentCreationDate = 2005-05-21 14:57:51 +0200;
    kMDItemContentModificationDate = 2005-05-21 14:57:51 +0200;
    kMDItemContentType = "com.maniacalextent.tradestrategist.tsdoc";
    kMDItemContentTypeTree = (
        "com.maniacalextent.tradestrategist.tsdoc",
        "public.data",
        "public.item",
        "public.content"
    );
    kMDItemDisplayName = {"" = Please; };
    kMDItemKind = {"" = "Trade Strategist Document"; };
    kMDItemTextContent = ("kjhg   Plot");
}'



If I search for the display name, I find it no problem with spotlight, but if I search for say 'kjhg' in the text content, it doesn't find anything. It doesn't work from the GUI, and also not with the mdfind command:

mdfind "kMDItemTextContent == '*kjhg*'"


What am I missing?

Drew


---------------------------------------------------------

Drew McCormack


www.maniacalextent.com



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Exclude files from backup
  • Next by Date: Re: Exclude files from backup
  • Previous by thread: Re: Exclude files from backup
  • Next by thread: Serious bug in NSFileManager fileExistsAtPath:?
  • Index(es):
    • Date
    • Thread