Page MenuHomePhabricator

Allow search results to be snippeted, roughly

Authored by epriestley on Sep 10 2015, 6:42 PM.



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

rP Phabricator
Lint Not Applicable
Tests Not Applicable

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.