The All Places scope

After more than an hour of experiments I discovered how to search the vendor directory. You first need to mark it or its subdirectory as Sources Root and then search for a given phrase using the Project Production Files scope. This is not very intuitive but that's beside the point.

The point is that All Places scope search should not yield less results that any other scope. But it does! After marking a subdirectory of vendor as Sources Root and searching for a phrase I get 13 matches in 8 files in Project Production Files scope, but 100+ matches in only 2 files in All places scope. This shows that All places is not as inclusive as the name suggests.

1

My apologies, but I am a bit lost. 13 is less than 100+, is it not?
I suppose the number of files also has a plus after it.

Find in Path doesn't show all results, what it shows is a number of first that IDE considers most relevant, and sure thing these considerations are not perfect.

If you want to see all results, please press Ctrl+Enter in Find in Path to get the Find Occurences tool window.

0
Avatar
Permanently deleted user

I just used Find in Path with "Scope: All Places" and got 1 displayed match (although the grayed-out blurb says "100+ matches in 1+ file"). But when I used "In Project" or "Directory (with the root of the project selected), I got 48 displayed results (and the blurb said "48 matches in 7 files"). This is quite unexpected, unhelpful, and confusing; and there is no apparent way to fix this.

Also weird is that, with the "All Places" option, when I click the "Words" checkbox, I get more displayed results (whereas logically one should not get more results when adding a constraint). Another weird example is when I uncheck all the boxes and just change the case of my search string, I also get more results.

I guess the best way to avoid these issues is to never use "All Places", and just use the "Directory" approach  (with the root of the project selected)?

0

@Samuel Yang

You need to remember that:

  • The results displayed in the Find in Path popup is more of a preview (so you can check if you are typing the right thing etc).
  • It also needs to be fast (as it's a preview): that's why results are mixed/not sorted and may change the order if the same search is done again.
  • It shows TOP 100 results only. If there are 180 results in ALL files but the first file where the results were found contains 100+ results (e.g. 140 of them), you may see just that ("100+ results in 1+ file" notice).
  • To see ALL results use "Open in Find Window" button (Ctrl+Enter on Windows) at the bottom right -- it will open standard dedicated Find Results tool window with ALL results (grouped by file/folder etc). The "preview file" option is also available there. The search here will pause at 1000 matches and will ask if it should continue the search.
0

> The results displayed in the Find in Path popup is more of a preview (so you can check if you are typing the right thing etc).


Wow this is a shocker after all these years.

Maybe there should be a more obvious indicator that there could be more results if we clicked on “Opne in Find Window”. Perhaps some ellipses “…” as the last row of the popup?

1

请先登录再写评论。