Page MenuHomePhabricator

Improve default search to prefer tasks over changesets
Closed, DeclinedPublic

Tokens
"Like" token, awarded by FriedhelmW."Pterodactyl" token, awarded by Liuxinyu970226."Piece of Eight" token, awarded by Ricordisamoa."Piece of Eight" token, awarded by Nemo_bis."The World Burns" token, awarded by JanZerebecki.
Assigned To
Authored By
Tgr, Nov 29 2014

Description

Upstream task: https://secure.phabricator.com/T7314

When entering something in the search bar at the top of the page, the results are swamped by commits. Given that the number of commits increases much more sharply than the number of tasks, this will only become worse with time. I would argue this is a poor user experience because most users (and especially new users who have léess experience navigating Phabricator) are interested in commenting at a task or making a bugreport, not in looking at commits; and even experienced users (who are interested in looking at commits) typically use some sort of review dashboard and not fulltext search to find those.

Two suggestions:

  • if possible, set search to filter for tasks by default
  • at the very least, the filter should be set when I am in one of the subareas of Phabricator. I.e. when I am in Maniphest (looking at a bug), the search should be limited to bugs; when I am in Diffusion, the search should be limited to commits.

Event Timeline

Tgr created this task.Nov 29 2014, 9:21 PM
Tgr raised the priority of this task from to Needs Triage.
Tgr updated the task description. (Show Details)
Tgr added a project: Phabricator.
Tgr changed Security from none to None.
Tgr added a subscriber: Tgr.

When entering something in the search bar at the top of the page, the results are swamped by commits

That is only true when you are at https://phabricator.wikimedia.org/.
It is not true when you are at https://phabricator.wikimedia.org/maniphest/.
Which makes sense in my opinion so I would not change the current behavior.

Qgil triaged this task as Normal priority.Nov 29 2014, 10:06 PM
Qgil added a subscriber: Qgil.

About your first suggestion, note that users can define the default search they wish to have here: https://phabricator.wikimedia.org/search/query/edit/ . This is not evident, neither documented at the moment. As far as I know, Phabricator doesn't have a configuration option to define which search query is offered to all users by default.

About your second suggestion, see T1374: When I'm in a task, search should bring to maniphest's search

Tgr added a comment.Nov 29 2014, 10:19 PM

When entering something in the search bar at the top of the page, the results are swamped by commits

That is only true when you are at https://phabricator.wikimedia.org/.
It is not true when you are at https://phabricator.wikimedia.org/maniphest/.

When I follow the second link, enter "foo" in the top search bar and press enter, I get this page, which is still swamped by commits.

Tgr added a comment.Nov 29 2014, 10:25 PM
In T76273#794511, @Qgil wrote:

About your first suggestion, note that users can define the default search they wish to have here: https://phabricator.wikimedia.org/search/query/edit/ . This is not evident, neither documented at the moment. As far as I know, Phabricator doesn't have a configuration option to define which search query is offered to all users by default.

Following the link and adding a new custom search called "All Documents" (which in fact does not search all documents) seems to do the trick. Is that what you meant? I would have definitely not figured that out on my own, the apparent purpose of that page is to add new saved searches to the sidebar, not to influence default search behavior...

In T76273#794524, @Tgr wrote:

That is only true when you are at https://phabricator.wikimedia.org/.
It is not true when you are at https://phabricator.wikimedia.org/maniphest/.

When I follow the second link, enter "foo" in the top search bar and press enter, I get this page, which is still swamped by commits.

Hmm, interesting, because I end up on a page that has these search parameters shown/enabled:

  • Query: foo
  • Document Status: Open
  • Document Types: Task

...so I only get tasks shown.

Qgil added a comment.Nov 29 2014, 10:36 PM

The top search bar is governed by the query located at the top of https://phabricator.wikimedia.org/search/query/edit/

You can sort the pre-defined queries putting i.e. "Open Tasks" on top, or you can create new saved queries, and put your preferred on top.

Qgil lowered the priority of this task from Normal to Low.Dec 8 2014, 8:18 AM
Qgil added a project: Elasticsearch.
Qgil added a subscriber: demon.

I have documented the possibility to customize your default search queries at https://www.mediawiki.org/wiki/Phabricator/Help#Defining_your_default_search_parameters

I agree that in general open tasks should be promoted over commits. To fix that we should know which are the current sorting griteria, and whether we can fine tune them locally or this should be improved at a Phabricator Elasticsearch engine level.

@Chad, what do you think?

demon added a comment.Dec 10 2014, 4:28 AM

Phabricator does nothing special here, it returns all documents unless you explicitly filter some in/out of the query.

I'll have a look and see if we can maybe add a function score to it (configurable, I'd guess).

Tgr added a comment.Dec 10 2014, 9:56 PM

at the very least, the filter should be set when I am in one of the subareas of Phabricator. I.e. when I am in Maniphest (looking at a bug), the search should be limited to bugs; when I am in Diffusion, the search should be limited to commits.

Compare how e.g. Github works: when you are in a repo, the search box has a little "This repository" tag in it (which can be cleared by backspace) which limits the search to the current repo. Something similar could be done in Phabricator with the applications: when you are e.g. in Maniphest, show a little "Tasks" prefix which can be removed, and if it is not removed, the quicksearch should send you to the Maniphest search form (which has different controls, so filtering is not the only reason why it is far superior to the general search form) instead of the generic search form.

Qgil added a comment.Dec 10 2014, 10:03 PM

Upstream has strong opinion on their search UI. Since you are active upstream, I would recommend you to bring your requests directly there.

Thanks to Chad, I think we can improve the effectiveness of our search here and upstream, but when it comes to UI I'm not seeing much in investing time and energy discussing among ourselves here.

JanZerebecki added a subscriber: JanZerebecki.
jayvdb added a subscriber: jayvdb.Feb 6 2015, 4:14 AM
chasemp closed this task as Declined.Feb 11 2015, 4:05 PM
chasemp claimed this task.
chasemp added a subscriber: chasemp.

There is an implicit behavior that I think can solve this for individual users if they desire (wish is already noted somewhat above).

If you go to https://phabricator.wikimedia.org/search/query/advanced/ and search for soemthing with "task" only checked and then save that search as say "tasks only" it saves to the left hand side of the interface. The slightly implicit thing here is the top saved search influences the default search parameters. So when I do this and then search for say 'elastic search' it finds me only tasks, and I have the option of selecting "all open documents" below it if I desire.

We don't have the resources to make this global change locally, nor is it most likely a reasonable thing to do. The individual work around is the best we've got.

Ricordisamoa added a subscriber: Ricordisamoa.
scfc added a subscriber: scfc.Feb 11 2015, 7:11 PM

https://secure.phabricator.com/T6905, "On design/product philosophy": "Phabricator itself is a productivity tool first, and specifically built for people who spend large amounts of time in it. Increasing their productivity is one of our core design philosophies." I think the emphasis is on "who spend large amounts of time in it".

@chasemp Wow, the change to the default search behavior when you save a query is ... dark magic. Theoretically, if we wanted to, could we add a custom search for all users by default that's set to "Tasks only" to change the defaults?

I'd love to hear from more users whether they find the current default behavior helpful or not. The tokens and subscribers on this task seem to indicate that quite a few users do not, but does anyone actually prefer it this way for their regular work?

I'd love to hear from more users whether they find the current default behavior helpful or not. The tokens and subscribers on this task seem to indicate that quite a few users do not, but does anyone actually prefer it this way for their regular work?

For me it is not helpful at all. I usually browse code/commits via Gitblit or GitHub and use Phabricator only to manage tasks. To search for a specific commit, git log is much better.

demon added a comment.Feb 13 2015, 4:27 PM

I'd love to hear from more users whether they find the current default behavior helpful or not. The tokens and subscribers on this task seem to indicate that quite a few users do not, but does anyone actually prefer it this way for their regular work?

For me it is not helpful at all. I usually browse code/commits via Gitblit or GitHub and use Phabricator only to manage tasks. To search for a specific commit, git log is much better.

Considering Diffusion is planning to replace Gitblit and Differential replace Gerrit, I think people should get used to treating Phabricator as more than just a task tracker.

chasemp added a comment.EditedFeb 13 2015, 5:02 PM

@chasemp Wow, the change to the default search behavior when you save a query is ... dark magic. Theoretically, if we wanted to, could we add a custom search for all users by default that's set to "Tasks only" to change the defaults?

It is uncomfortably implicit and not really clear. The saved searches being per user it wouldn't work to add them for every user. The default list of global searches we could in theory extend, yes. I don't have a good bead on how much work ongoing it would be to maintain that. The default global's being 'All Documents', 'Open Documents' and 'Open Tasks'. I tinkered around with not extending the list but just rearranging them so that 'Open Tasks' is returned as the first order global. That isn't a big change, but most of the time when searching tasks I don't know the state of the tasks I am interested in. I'm not sure if excluding closed and stalled tasks by default is least-surprise for users either.

I think my hope for search at the moment that doesn't create local issue is:

  • Encourage upstream to make the UI and behavior more clear in general. A "use this search as my default global" or something dropdown would be really sane.
  • Have someone from WMF come up with the time to sort out the Elasticsearch issues. We know ES is much more friendly and flexible to search in general, but we are short on expertise.

We have seen a few requests to tweak defaults that are not by the nature of Phabricator's config system easily changeable. Most of these have centered around notification settings (https://phabricator.wikimedia.org/settings/panel/emailpreferences/). In these cases, where a relatively small group of users are against a particular default, breaking down the wider user preference settings hasn't lead in any clear direction yet.

A notable example is 'Send me an email when I take an action', which is on by default. It is not something we can change the nature of without patching the source, but some definite group of users find really disconcerting. In looking at the settings across the user base it is (or was at the time) only a minority who had changed it, and upstream had done similar investigations to the same effect. I don't know if this is a result of user apathy, or user ignorance, or user preference. It is super hard to tell what defaults are sanest I think.

I lean heavily towards documenting search idiosyncrasy and making known how to change it, and seeing how user behavior evolves as we integrate more code oriented functionality. At some point it may definitely be clear that our use case stems from a different perspective and the native behavior is unfriendly to the point of changing it for everybody.

I don't think we know enough now to know we are doing it well. But I know that doesn't necessarily mean I'm right.

Filed https://secure.phabricator.com/T7266 and talked to upstream a bit who seemed not hostile to some accommodation :)

Do we have a group of users that we want to be able to most easily find open tasks over other document types without needing to invest time in setting preferences?
If we have, how important is that group, when considering usability for Phabricator?

Now in the end this is probably better fixed by a working search and better search ranking (incorporating amount of links, type of document and state), neither of which we currently have.

Wow, the change to the default search behavior when you save a query is ... dark magic.

At least documentation got a bit clearer now (whoever was that IP: thanks!): https://www.mediawiki.org/w/index.php?title=Phabricator%2FHelp&diff=1409068&oldid=1396917

Wow, the change to the default search behavior when you save a query is ... dark magic.

At least documentation got a bit clearer now (whoever was that IP: thanks!): https://www.mediawiki.org/w/index.php?title=Phabricator%2FHelp&diff=1409068&oldid=1396917

yw :)

jayvdb reopened this task as Open.Feb 16 2015, 7:21 AM

Based on comments at T75854, the default behaviour should be to only include tasks, or exclude commits.

Qgil updated the task description. (Show Details)Feb 16 2015, 8:27 AM
Qgil moved this task from Need Discussion to Upstreamed on the Phabricator (Upstream) board.
Aklapper removed chasemp as the assignee of this task.Feb 17 2015, 12:03 PM
Aklapper removed a project: Phabricator.

The default list of global searches we could in theory extend, yes.

Could we investigate this? I have seen nobody comment that they want the current commit results as part of default search results, and multiple comments from devs who find them distracting and unhelpful. A reasonable fix that works for all users by default would go a long way to reduce the noise level. Thanks for all your help with this so far.

If this is considered important enough to warrant maintaining a downstream diff:
src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php defines the order of the default global search queries via an array in getBuiltinQueryNames().
Changing the order of the three items in that function changes the order for accounts that still have the initial default order of searches.
Accounts that have already changed their order of searches already seem to be not affected by the code change (at least when testing in my local Phab instance).

(Note that each application in Phabricator has its own defined array so this is obviously only about the global, cross-Phab-application search.)

Qgil added a comment.Feb 18 2015, 2:33 PM

Evan thinks that @Aklapper local solution might work for our case. Meanwhile, they have no plans to change Phabricator's current default, and the task to watch is Implement "Role Profiles" to provide search, homepage and application defaults.

FriedhelmW added a subscriber: FriedhelmW.
Nemo_bis added a subscriber: Nemo_bis.

Given T98691#1278570, is there a way to make "Search current application" the side-wide default for the general search bar?

Given T98691#1278570, is there a way to make "Search current application" the side-wide default for the general search bar?

Not that I know, but if it bothers you a lot and if you are fine with ugly local hacks and ignoring the incorrect icon in the UI, JavaScript should work in your browser:

if (document.getElementsByName('search:scope').length >= 1) { 
  document.getElementsByName('search:scope')[0].setAttribute('value', "application");
}
Restricted Application added a project: Discovery. · View Herald TranscriptJun 14 2015, 1:04 AM
jeremyb-phone edited subscribers, added: jeremyb; removed: jeremyb-phone.Jun 14 2015, 1:05 AM
chasemp closed this task as Declined.Aug 13 2015, 9:52 PM
chasemp claimed this task.

It is now possible for any user to set their default search easily. I'm declining this for that reason. :)

It is now possible for any user to set their default search easily

Hmmm. https://www.mediawiki.org/wiki/Phabricator/Help#Defining_your_default_search_context

Restricted Application added a project: Discovery-Search. · View Herald TranscriptMay 18 2016, 9:14 PM
Restricted Application added a subscriber: TerraCodes. · View Herald Transcript