Page MenuHomePhabricator

Use ApplicationSearch to power primary search
ClosedPublic

Authored by epriestley on Jan 31 2014, 9:15 PM.
Tags
None
Referenced Files
F14489074: D8123.id.diff
Wed, Jan 1, 8:08 PM
Unknown Object (File)
Sat, Dec 28, 6:52 PM
Unknown Object (File)
Tue, Dec 10, 10:47 AM
Unknown Object (File)
Fri, Dec 6, 1:50 PM
Unknown Object (File)
Nov 27 2024, 10:22 PM
Unknown Object (File)
Nov 26 2024, 11:43 AM
Unknown Object (File)
Nov 26 2024, 11:43 AM
Unknown Object (File)
Nov 26 2024, 11:43 AM
Subscribers

Details

Summary

Ref T4365. Drive primary search through ApplicationSearch instead of through a bunch of custom nonsense. Notably, this allows you to save searches, notably.

The one thing this doesn't do -- which I'd like it to -- is carry your query text across searches. When you search for "quack", I want to overwrite the query in your default filter and give you those results, so you can turn the search into an "Open Tasks" search by default by reordering the queries. I'll probably do that next. It feels a little hacky but I want to try it out.

Test Plan

{F106932}

Diff Detail

Repository
rP Phabricator
Branch
appsearch4
Lint
Lint Passed
Unit
No Test Coverage

Event Timeline

Notably...!

The bit you want to do next strikes me as interesting... I am not sure what user expectations would be exactly. The part that I think is tricky is that though you noted default queryI could image expecting it to work for a custom query as well, e.g. "quack" populating as a term when selecting the custom "all my open jonx" query after learning to expect the same on "open doc" query.

I would love some pro-shorthand  for search. For example:

"OT: quack"

Seaches open tasks with quack

"CD: quack"

Searches closed diffs with quack

"T: quack"

Searches any task with quack

Anywho, I never get what I want from the first search, and usually have to flip switches. Maybe something like this already works though, I am bad at knowing the product sometimes.

I ran into a bunch of mess actually getting the implementation working the way I wanted, and I'm not sure it would be good even if we did get it working. Part of the reason that it's difficult is that we render the menu before executing the query right now, so we don't have an opportunity to add on any ?query=whatever stuff. Some of this difficulty is just the infrastructure working in a sort of silly way right now, but some of it seems hard to implement cleanly without special casing this sort of thing.

Maybe I'll just do the "when you type stuff into the menu bar, we overwrite the query of your first/default filter, and execute that" (which seems mostly reasonable and is easy), but not do "when you navigate from that page to other filters, we'll carry the query along" (which might be useful, but starts to get kind of weird/unexpected, and ends up being really messy to implement).

It would be fairly easy to do "ot:", but I worry it will go virtually unused because it won't be discoverable (for example, you can already type "task: xyz" to prefill a task, but I'd guess zero people know about or use it). The driving use case here (from @bigo) is a desire to make global search mean "open tasks" by default.

Id use it at least, would you though? I would pay for that feature. Several tokens. :D

(I'm holding this until I can set up ElasticSearch and verify I didn't break anything on that pathway.)

epriestley updated this revision to Unknown Object (????).Feb 3 2014, 8:50 PM
  • Got ElasticSearch working.
  • Fixed two minor issues with ElasticSearch integration.
  • Locked search.elastic.host config, because a malicious administrator could point it at a host they control and thereby gain access to documents they could not otherwise see.