*BUG* Project Search Not Working Right

Version: (1238528) 64-bit - 23 Mar 2021

I have a 120k word WIP with around 245 subdocuments.

Since I’ve started writing it, I’m certain I’ve used multiple variations of “Mm-hmm” (Mmm-hmm, etc.) and I was wanting to search through my WIP to find each instance so I could correct it.

To do this, I used a Project Search (FIND->PROJECT SEARCH)

There were a gazillion results, which is fine, I have several drafts of my WIP in my project. So I started wading through them to get them fixed. I originally search for ‘mm’ and found too many false positives-- and a lot of results, though I didn’t initially think anything about it-- so I tried ‘hm’ and still got a lot of false positives and a lot of results.

So I figured, I’ll search for ‘-hm’ and that way I can be sure that I’ll only be catching the few instances I suspect are in my WIP. But I still got a whole lot of results.

As I started working my way through them, I kept noticing more and more there were NO hits in the files I was looking through. The file was simply included in the results list.

I continued working through them, fixing the issues I did fine, but the strange thing is-- I started seeing files I KNOW are TOTALLY BLANK in the results list !!!

After a moment or two of that, I started double-checking the files that DID have text very carefully, both by eye, and by using CTRL-F (Document Find) and F3 to look for the same thing, “-hm” and was in total agreement-- the letters did not exist in that order in the file.

I figured I had to be doing something wrong, so I tried again several ways. I also tried it against just regular words, which DOES seem to work. So it’s not broken in every situation. Just the one I noted, apparently.

Perhaps a leading dash has some particular meaning?

I think I’ve used Project Search before to look for and change ‘—’ to something else. But that’s been quite some time ago (months) and something could have changed or fallen-out since then… ???

But, just in case anybody’s wondering, here’s the ENTIRE CONTENTS of the BLANK FILE that was included in the list… —><—

See it? It’s right there between the arrowheads. (Hint, nothing… :slight_smile: )

Those characters (nor any others) simply do not appear in the vast percentage of the files it’s claiming in the results list.

I’ve made you a nice screenshot so you can see it for yourselves.

I think we have a bug here :slight_smile:


On Mac, in the project search options menu way down at the bottom, there’s a search option called "invert results ". Does Windows Scrivener 3 project search have this option? If so, is it by chance turned on? (I ask only because I reported this very bug on the Mac Scrivener 3 version once… :blush:)

Invert results?

If there is, I don’t see one. Also, fwiw, it seems to work fine when I ask for something else. For example, I write out the time in many of my files, so I tried looking for “thirty”-- same way, using a Project Search, and that seemed to work fine, and retrieved about the right number of files. I didn’t look through them all, but spot-checking, the ones I did look at all did have ‘thirty’ somewhere in them,

Also, just in general, I’ve used Project Search before-- not every day, but numerous times in the past, and haven’t noticed anything unusual about it. It was only when I was attempting this one search that things seemed weird.

I’m sure it’s my fault somehow, it generally is. But I don’t know what I’m doing to trigger it.

Thanks for the response!!


You’re welcome! Crawling back into my Mac-lined cave now…

Yes, it does. See page 213 of the user manual under “Finding things that don’t have a word.” It could explain why you are seeing blank documents in the results list.

Well, that explains that. But I’m not sure how to find what I need then. I tried escaping it the other day (backslash) and that didn’t work. Maybe a regex search will work.

Thank you much for the tip!!!

(BTW-- Regex worked brilliantly! :slight_smile: )


Their RegEx spec is this one: https://perldoc.perl.org/perlre

I tried choosing RegEx as the search operator and the escaping the leading dash with a backslash and that worked in my little test file.

I spaced out when reading your reply. Sorry for my useless answer.

Just noting for posterity that, yes, Windows Scrivener 3 project search does have the “invert results” feature. :slight_smile:

I don’t know if it will help others, but if you click the left-hand magnifying glass in the Project Search term bar, it gives options for tweaking your search. I just found this out today, looking for answers to things like OP’s problem.