search keeps resetting scope

8367774--1102488--upload_2022-8-16_14-3-36.png
then
8367774--1102491--upload_2022-8-16_14-3-43.png
esc

ctrl+space
and it's back to project

8367774--1102494--upload_2022-8-16_14-4-5.png

Hi! Do you have focus in the Project Browser's search field by any chance? If you have focus in the Project Browser's search field or the Scene Hierarchy's search field, then using the "Main Menu/Edit/Search All" shortcut will open Search in their respective tabs, regardless of where it was when it was last closed. If you reopen Search without any focus or by using the Global Search icon, it will reopen with the previous "global" state.

[quote=“sebastiengrenier”, post:2, topic: 891328]
Hi! Do you have focus in the Project Browser’s search field by any chance?
[/quote]
No.
[quote=“sebastiengrenier”, post:2, topic: 891328]
regardless of where it was when it was last closed
[/quote]
do you think it’s better like that?

This was done deliberately to be used in conjunction with the "sync" feature. However, if sync is off, maybe we shouldn't force the view state.

With that said, I'm not sure why in your case this would behave like that. On my end the view state is properly restored in 2022.2.0b4. I'm assuming that "Ctrl+space" is your shortcut for Global Search ("Main Menu/Edit/Search All")?

[quote=“sebastiengrenier”, post:4, topic: 891328]
However, if sync is off, maybe we shouldn’t force the view state.
[/quote]
Definitely.

Also if you could fix the show tab resetting that’d be extra space for the list.
[quote=“sebastiengrenier”, post:4, topic: 891328]
However, if sync is off, maybe we shouldn’t force the view state.
[/quote]
Where is the sync option?

First, you have to set the search engines for Project or Scene to "Advanced":
8393088--1107654--upload_2022-8-26_10-35-59.png
Then, when you open Search, you should see an icon in the tab bar that allows you to toggle "Sync" on and off:
8393088--1107666--upload_2022-8-26_10-50-4.png
However, I just realized that the same issue happens with this option for Project and Scene search, i.e. it is forced enabled when we open Search from the Project Browser or the Scene's search field. We should add an option to enable/disable the forced view state for those scenarios.

But that still doesn't explain why your state doesn't get restored properly when you open the global search. Do you have the same issue when using the global search icon, or just your shortcut?

I see, that’s interesting. Do you have a video showcasing the benefit of contextual search like that? Within a production off course because as your speed goes up implicit things get in the way. Even with the syn off (it doesn’t persist, it should to be consistent with unity behavior or toggles)
Now, I am sure you will fix that non persistence of sync toggle.
But here is my comment on what you are trying to do: instead of pushing for use of the massive search window for advanced queries, could you instead make accessible those queries inside the imbedded search field?

[quote=“sebastiengrenier”, post:7, topic: 891328]
But that still doesn’t explain why your state doesn’t get restored properly when you open the global search. Do you have the same issue when using the global search icon, or just your shortcut?
[/quote]
I had mapped the contextual search instead of search all by mistake.

Now that this is search all, ctrl+space calls the search all tab unless a search field is editing

[quote=“laurentlavigne”, post:8, topic: 891328]
Do you have a video showcasing the benefit of contextual search like that?
[/quote]
Sorry, we don’t have any video for that.
[quote=“laurentlavigne”, post:8, topic: 891328]
But here is my comment on what you are trying to do: instead of pushing for use of the massive search window for advanced queries, could you instead make accessible those queries inside the imbedded search field?
[/quote]
This is what setting the “Search engine” to “Advanced” does. It lets you use the same powerful search as the Search window within the Project Browser or the Scene Hierarchy. You don’t have to open the Search window or use the Sync option. It’s there if you wish to use it for any reason, like loading a saved search query or using the Query Builder to build your query.
[quote=“laurentlavigne”, post:8, topic: 891328]
I had mapped the contextual search instead of search all by mistake.

Now that this is search all, ctrl+space calls the search all tab unless a search field is editing
[/quote]
Glad to hear that you were able to make it work!

[quote=“sebastiengrenier”, post:9, topic: 891328]
This is what setting the “Search engine” to “Advanced” does. It lets you use the same powerful search as the Search window within the Project Browser or the Scene Hierarchy. You don’t have to open the Search window or use the Sync option. It’s there if you wish to use it for any reason, like loading a saved search query or using the Query Builder to build your query.
[/quote]
nice! auto wildcard type. Advanced should be the default, why is it not?
8400627--1109145--upload_2022-8-29_16-19-36.png

1 Like

"Advanced search" (ie. QuickSearch) requires a search cache to be built, and performs a bit worse than the old one. It's also got this really annoying property where it goes "there's no results for your search" while what it really means it "we're still waiting for the background search thread to finish searching".

So there are some reasons to still use the old one.

2 Likes

There was a lot of backlash when we did enable it by default (I don't remember if it was just internally or not), so we reverted that change.

1 Like

[quote=“Baste”, post:11, topic: 891328]
It’s also got this really annoying property where it goes “there’s no results for your search” while what it really means it “we’re still waiting for the background search thread to finish searching”.
[/quote]
@sebastiengrenier you got this?

[quote=“sebastiengrenier”, post:12, topic: 891328]
There was a lot of backlash when we did enable it by default (I don’t remember if it was just internally or not), so we reverted that change.
[/quote]
Got the notes on that? I’m interested in all things UI/behavioral

[quote=“Baste”, post:11, topic: 891328]
It’s also got this really annoying property where it goes “there’s no results for your search” while what it really means it “we’re still waiting for the background search thread to finish searching”.
[/quote]
[quote=“laurentlavigne”, post:13, topic: 891328]
@sebastiengrenier you got this?
[/quote]
This will be fixed in 23.1. We updated what we call the “Empty View” to be more explicit of what is going on, i.e. search is still in progress, indexing is in progress, there really are no results, etc. It will also provide more help when there is no result, such as giving you some hints on options you could enable to get more results.

[quote=“laurentlavigne”, post:13, topic: 891328]
Got the notes on that? I’m interested in all things UI/behavioral
[/quote]
I don’t have any to show, but from what I remember the consensus was “don’t change the behavior of what is already working.” By default, the “Advanced” engine (Search) will give more results for a given query than what you would expect from the Project Browser or the Scene Hierarchy. People were not happy with this, which is understandable. So we reverted the default engine until further notice.

[quote=“sebastiengrenier”, post:14, topic: 891328]
I don’t have any to show, but from what I remember the consensus was “don’t change the behavior of what is already working.” By default, the “Advanced” engine (Search) will give more results for a given query than what you would expect from the Project Browser or the Scene Hierarchy. People were not happy with this, which is understandable. So we reverted the default engine until further notice.
[/quote]
It makes sense and it’s good that you want to not perturb muscle memory, but then why did you add this button?
8408901--1110960--upload_2022-9-1_13-18-40.png

[quote=“sebastiengrenier”, post:14, topic: 891328]
I don’t have any to show, but from what I remember the consensus was “don’t change the behavior of what is already working.” By default, the “Advanced” engine (Search) will give more results for a given query than what you would expect from the Project Browser or the Scene Hierarchy. People were not happy with this, which is understandable. So we reverted the default engine until further notice.
[/quote]

This is opposite to my experience - it returned less results.

  • The hierarchy search box wouldn’t show results from the DontDestroyOnLoad scene
  • The object picker would prepopulate the query with the entire namespace of the type of object (t:MyNamespace.MyClass) and would return zero results. You’d have to manually change it to t:MyClass to get any hits.
  • The project search box would work, mostly, until sometimes the index was busy being rebuilt in which case it returned a mix bag of results. So it felt completely unreliable - I’d search for something “UIWindow” - and I’d get 3-4 hits. Something feels off. I wait a little, and search again, and get my expected number of results. Sometimes I get no hits.
  • It also slowed down search results considerably. Not seconds of time, but enough time to make it feel very sluggish and slow. Searching project for a simple string felt like a heavy operation.
  • The constant index scanning/regeneration slows down the editor considerably, and can take a long time to resolve.
  • This is Unity 2021 LTS

Lots of great ideas with the new search system. But its too slow/heavy and does not fill me with faith with the results it returns. (index is constantly in flux and outdated, and so are the results).

I trust the legacy search because I know it will definitely find everything in the project for the given query, if it is a query it supports. (name search, search by type, etc).

Baste touched on this last point. The new search presents the results of the query as if it is definitive - No results found! but in reality, there might actually be results - its just waiting for the index to build. I just can’t put any faith in it!

[quote=“laurentlavigne”, post:15, topic: 891328]
It makes sense and it’s good that you want to not perturb muscle memory, but then why did you add this button?
[/quote]
This button was added with the sync feature. However, even if your search engine is the default one (i.e. not advanced), the idea was that you can still use it to open search with the current query if you don’t find what you are looking for. If this is annoying to you and would like it gone, then this is something that will have to be brought to the design team.

[quote=“Prodigga”, post:16, topic: 891328]
This is opposite to my experience - it returned less results.
[/quote]
Sorry, I totally misspoke. I should have said different results. In our experiments, most of the times it was more, but it can also be less. It really depends on your search indexes.

For your issues, you should open some tickets. We are aware that there are some issues with indexing (i.e. the slow times), but it shouldn’t be constantly re-indexing unless you are constantly modifying your assets.

1 Like

[quote=“sebastiengrenier”, post:17, topic: 891328]
This button was added with the sync feature. However, even if your search engine is the default one (i.e. not advanced), the idea was that you can still use it to open search with the current query if you don’t find what you are looking for.
[/quote]
I never use that, anyone? Seems like power user workflow which shouldn’t take up space, there is a shortcut for it as we’ve seen.
[quote=“sebastiengrenier”, post:17, topic: 891328]
If this is annoying to you and would like it gone, then this is something that will have to be brought to the design team.
[/quote]
If you could do it that’s be great.

[quote=“Baste”, post:11, topic: 891328]
So there are some reasons to still use the old one.
[/quote]
After having used advanced for a few weeks now and with the project growing in asset# I know why it’s not default: it’s much slower than builtin.

Hi Laurent, can you elaborate what is slower? Project Search? Hierarchy?

We have tested in really big projects (more than 500K assets) and usually the search window stays responsive while searching for assets while the project window using the legacy search freezes the ui.

If you give me more details, I can benchmarks the workflows you found slower.

Thanks,

Sebastien

[quote=“laurentlavigne”, post:19, topic: 891328]
After having used advanced for a few weeks now and with the project growing in asset# I know why it’s not default: it’s much slower than builtin.
[/quote]