I've imported most of a javascript code base via mdimport (using the packaged SourceCode.mdimporter provided by Xcode) and it succeeds. However, mdfind only ever returns to me at most two results, those being the two most recently accessed files. For example, if files A, B and C all contain the substring "term", mdfind "term" would show only A and B. If I then opened file C, the subsequent call of mdfind would only show B and C. How do I get mdfind to return to me all files containing my term?
1 Answer
When I performed a test for a term contained in three files, it showed all the files when running the mdfind command. I would recommend rebuilding your spotlight index on the current folder/s you are in and see if that fixes it. To rebuild your spotlight index: Spotlight: How to re-index folders or volumes
-
Note: The order of the results did change based on last modification.– MrDanielCommented Feb 4, 2012 at 1:43