Spotlight does not find. Indexing works.

If you have this line in a shtml and search for web_InitAO there is no finding.

<!--#4DSCRIPT/web_InitAO-->


If you change the line to

!--#4DSCRIPT/web_InitAO-->

spotlight finds web_InitAO.

Why does a < stop the finding ?

MacBook Pro 14″, macOS 26.0

Posted on Nov 6, 2025 8:06 AM

Reply
Question marked as Top-ranking reply

Posted on Nov 6, 2025 9:42 AM

The "<" and ">" characters in Spotlight are reserved operators for earlier or later than qualification. For example, any HTML files created before a date:

kind:html created:<11/01/2025


or after a date:

kind:html created:>11/01/2025


For document types that support a Spotlight size, one can use those comparison operators to find files that are less than or greater than a given size. Or one can isolate PDF documents for instance whose pages are greater than 50.


Because Spotlight searches are case-insensitive and do not permit wildcards, even a partial string should find the containing document if unique, or documents if otherwise. That can reduce the complexity of the search string.

3 replies
Question marked as Top-ranking reply

Nov 6, 2025 9:42 AM in response to christer280

The "<" and ">" characters in Spotlight are reserved operators for earlier or later than qualification. For example, any HTML files created before a date:

kind:html created:<11/01/2025


or after a date:

kind:html created:>11/01/2025


For document types that support a Spotlight size, one can use those comparison operators to find files that are less than or greater than a given size. Or one can isolate PDF documents for instance whose pages are greater than 50.


Because Spotlight searches are case-insensitive and do not permit wildcards, even a partial string should find the containing document if unique, or documents if otherwise. That can reduce the complexity of the search string.

Nov 6, 2025 9:41 AM in response to christer280

christer280 wrote:

If you have this line in a shtml and search for web_InitAO there is no finding.
<!--#4DSCRIPT/web_InitAO-->

If you change the line to
!--#4DSCRIPT/web_InitAO-->
spotlight finds web_InitAO.
Why does a < stop the finding ?


Not sure what to say about your shtml...

I use php for server side Includes. Hard to believe this would make the difference because of file type.


however you can refine spotlight search(?) and compare your results.


kind:word

kind:image

keyword:austria

name:partialnamestring

kind:pdf

tag:flac

created:>12/01/2023


ref: Narrow your search results on Mac

Narrow your search results in Finder on Mac - Apple Support




if rebuilding the Spotlight index does not work...Rebuild the Spotlight index on your Mac - Apple Support





A SafeBoot Start up your Mac in safe mode - Apple Support will sort many anomalies...reboot and compare your results.



no resolve —you can delete all files under ~/Library/Metadata/CoreSpotlight/ and compare your results...

ref: Tahoe: Spotlight Doesn't Index and Search… - Apple Community







This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Spotlight does not find. Indexing works.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.