# Can no longer search by user in current category outside of advanced search

**URL:** <https://meta.discourse.org/t/can-no-longer-search-by-user-in-current-category-outside-of-advanced-search/232401>\
**Category:** Feature\
**Created:** [July 10, 2022, 2:10am UTC](https://meta.discourse.org/t/can-no-longer-search-by-user-in-current-category-outside-of-advanced-search/232401 "2022-07-10T02:10:18Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![seanblue](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@seanblue](https://meta.discourse.org/u/seanblue)\
**Post date:** [July 26, 2022, 10:31pm UTC](https://meta.discourse.org/t/can-no-longer-search-by-user-in-current-category-outside-of-advanced-search/232401/6 "2022-07-26T22:31:46Z")

</div>

> [@pmusaraj](#):
>
> I am pretty sure this never existed. It’s a reasonable request, but it is quite tricky to get right when using the special characters (@ and #). Without special characters, there are only two possible results for the search: the current category or everything. With the `@` character, we make a query for usernames matching the string after the `@`, so in many cases there will be many results

Ah, I vaguely remember having this conversation before… I think my big problem here is that the old version of search (with the checkbox to toggle searching in the current context versus globally) was able to handle this. In a sense, that simpler and less pretty version was more powerful, because you could easily toggle the context no matter what you were searching for. That’s one of the two reasons I liked the old version better, despite the new version looking nicer. (The second reason being that `Enter` now defaults to global search, but 90% of the time I want to do contextual search.)

> [@pmusaraj](#):
>
> So, for the requested behaviour, we would need to detect when the user search returns only one result and then show the contextual options (in current category / everywhere) if you are in a context. It’s certainly doable.

It looks like it already works when searching _just_ for an exact username, specifically when searching the current topic.

 ![image](https://global.discourse-cdn.com/meta/original/4X/2/1/8/218c6f5b94fbba934ab54c3a80ffcceee5c22739.png)

Doesn’t work on the category page though.

 ![image](https://global.discourse-cdn.com/meta/original/4X/2/7/0/27031f3d12ff1f2d24d364cbb28dd2abd414b7b8.png)

In general though, I think it would be good to support as much as possible when there is an exact match. It may be easy to add `#contribute:feature` as you suggested, but searching in the current topic is less straightforward. I just noticed that searching `some text @seanblue` in the current topic works, but searching `@seanblue some text` doesn’t. So I guess the current topic bit does partly work at least.

 ![image](https://global.discourse-cdn.com/meta/original/4X/9/8/7/9879608a2d9944d5d5e48db7b365d5459c844bb1.png)

 ![image](https://global.discourse-cdn.com/meta/original/4X/9/b/b/9bb2fba087b32cd55355cbfae8a4a3166868100e.png)

Anyway, everything I just wrote was kind of steam of consciousness. I haven’t really thought though the whole picture beyond “it would be nice if it always worked”. Besides separating out the contextual/global toggle again like the checkbox used to do, I don’t have any ideas for how to handle this simply in all cases.

---

_[View the full topic](https://meta.discourse.org/t/can-no-longer-search-by-user-in-current-category-outside-of-advanced-search/232401)._
