Spotlight fails to generate results while other Spotlight searches execute

Originator:kohlmannj
Number:rdar://7731838 Date Originated:09-Mar-2010 02:34 AM
Status:Open Resolved:
Product:Mac OS X Product Version:10.6.3/10D561
Classification:Serious Bug Reproducible:Always
 
Summary: 
Performing a second Spotlight search in one application while another application also performs a Spotlight search will not show results for the second search until the first search is cancelled or has timed out after an unacceptably long period of time.

Steps to Reproduce:
1. Perform one Spotlight search in any application the utilizes Spotlight, such as Finder, an Automator workflow with a "Filter Finder Items" action, mdfind in a Terminal prompt, or the Spotlight menu.
2. Perform a second (or more) Spotlight searches in a different window (e.g. a second Finder window) or different application (e.g. Finder vs. Spotlight menu or vice versa).
3. Wait for the second Spotlight search to generate relevant results for its given query.  (Recommend testing with queries that one expects to generate certain results).

Expected Results:
The first Spotlight search shows many results matching the given search query.  The second Spotlight search, as soon as it's started, begins showing results immediately, even though the first Spotlight search continues.  Both searches continue to simultaneously populate their results list as more items are found by Spotlight.  Eventually the two searches complete and indicate their completion - in Finder and the Spotlight menu, the spinning progress indicator disappears; in Automator, the Filter Finder Items action returns results and the Automator log notes its completion; in Terminal, mdfind completes and the shell prompt returns.  The concurrency of these two or more searches does not adversely affect the completion time of the others; though some results may be delayed in the second or third search while the first and second continue, the preceding searches eventually conclude, as do subsequent searches, until all Spotlight searches show all relevant results for their search queries very well within a 10-45 seconds of duration since they began on a top-speed Mac.  This is not affected by the terms of the search query; using Spotlight keywords such as "kind:image" or using any number of Finder's advanced Smart Folder criteria does not significantly impact a separate Spotlight search's ability to show results and complete eventually, even while running concurrently with one or more other searches.

Actual Results:
Starting a first Spotlight search in Finder or the Spotlight menu will make the query continue for a considerable amount of time, even if all relevant search results have already appeared in the results list.  Starting a second Spotlight search while the first one continues may produce certain special results as the user types in a query, but relevant results fail to appear in a timely fashion.  In fact, relevant results do not appear in the second search until the first Spotlight query times out, as indicated by the disappearance of the spinning progress indicator in Finder or the Spotlight menu or the reappearance of a command prompt in Terminal, for example.  Spotlight searches in the Spotlight menu started while another Spotlight search continues in Finder or elsewhere will show results for Applications or sometimes Dictionary entries corresponding to one part of a query that's being actively typed in (e.g. results for "kin" while the user types "kind:PDF"), but will thereafter completely fail to generate relevant results strictly until the first spotlight search has completed.  From a user's perspective, it appears as if the first search never times out, but merely continues to query even though all relevant results have seemingly appeared; the "completion" appears to be more of a timeout than an exit on success.  Third or fourth Spotlight queries also fail to show relevant results as the second search continues to wait for the first search to complete or time out.  Any Automator workflow utilizing a Filter Finder Items action or other Spotlight-utilizing action will appear to idle indefinitely while a query ahead of it continues until timeout or waits for a query ahead of it.
Additionally, queries performed in the Spotlight menu using keywords (e.g. "kind:image", "date:today" et cetera) will absolutely not generate relevant results, save for results matching an incomplete part of the full query (as described above, such as showing applications that match "kin" instead of "kind:image", and no more).  This behavior occurs even if no other Spotlight search query is running simultaneously.

Regression:
Mac OS X 10.5-10.5.8 appear to wait significantly less time before completing, and simultaneous queries return results simultaneously and independently of the completion of one another.  Additionally, standalone searches in Finder or the Spotlight menu appear to time out more quickly - the spinning progress indicator disappears within a few seconds, whereas the progress indicator will remain for several minutes, if not indefinitely in 10.6 or higher.  There are no noticeable concurrency issues or problems with performing multiple Spotlight queries at once in 10.5.x.  Additionally, the Spotlight menu correctly shows results for queries using keywords ("kind:pdf" et al) in 10.5.x.

Notes:
This issue has existed since 10.6 on my test machine, whose System Profile I have included.  It has persisted across a first Clean Install of 10.6 with migration from a Time Machine backup, a second Clean Install of 10.6 with the creation of  a new user account and a drag-copy of my files to said user account, as well as several rebuilds of the Spotlight metadata index by adding "/" to the Spotlight preferences' Privacy list and removing it, as well as other methods of purging the Spotlight metadata cache.  It remains present in 10.6.0 thru 10.6.3 build 10D561.  I have reproduced it on other machines running 10.6 to 10.6.2.

Additional, extensive written and audiovisual documentation are available at:
http://kohlmannj.tumblr.com/

Comments

… Additional, extensive written and audiovisual documentation are available at: http://kohlmannj.tumblr.com/

– I can't find relevant documentation at that URL.

Please, is 7731838 an issue with Mavericks or Yosemite?

By grahamperrin at Feb. 25, 2015, 6:56 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!