Page MenuHomePhabricator

Allow search results to be snippeted, roughly
ClosedPublic

Authored by epriestley on Sep 10 2015, 6:42 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 27, 3:20 AM
Unknown Object (File)
Sat, Dec 14, 2:35 AM
Unknown Object (File)
Fri, Dec 13, 7:22 PM
Unknown Object (File)
Wed, Dec 4, 4:57 PM
Unknown Object (File)
Tue, Dec 3, 1:54 AM
Unknown Object (File)
Sun, Dec 1, 11:19 PM
Unknown Object (File)
Sun, Dec 1, 11:14 PM
Unknown Object (File)
Sun, Dec 1, 11:13 PM
Subscribers
None

Details

Summary

Ref T8646. This is fairly rough:

This interface is very niche, and not really flexible enough to accommodate other result customization (but I don't think we have any plans here)?

I'm just summarizing the content of documents, basically showing the first paragraph of their content, summary, etc. This isn't what Google does: it shows snippets surrounding the actual search terms. However, this is more involved and might be less useful in structured data: for example, I'd imagine that the first line of most phriciton documents, maniphest tasks and Differential revisions really might be the best machine-generatable summary of them. The actual contextual snippeting in Google doesn't often seem hugely useful to me. But this might also not be very useful.

There's not much design, not sure if you had any ideas.

I only implemented this for tasks, revisions and the wiki since those seem most useful.

I'm generally on the fence about this, but it's not a ton of work to swap out for something else later. Maybe we can see how it feels? But happy to toss it or rethink the approach.

Test Plan

Screen Shot 2015-09-10 at 11.36.11 AM.png (1×1 px, 206 KB)

Diff Detail

Repository
rP Phabricator
Branch
searchinline
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 7963
Build 8955: [Placeholder Plan] Wait for 30 Seconds
Build 8954: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Allow search results to be snippeted, roughly.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.

Can we bold the matched term in the snippet?

Not while rendering it as remarkup.

chad edited edge metadata.

I'll have to play with it, this seems... bloaty.

This revision is now accepted and ready to land.Sep 10 2015, 8:37 PM
This revision was automatically updated to reflect the committed changes.

Yeah, this doesn't feel like it's quite there yet to me either.

For completeness: this felt terrible in production and was reverted by D14097. T8646 discusses finding other approaches to the problem.