Page MenuHomePhabricator

Implement very rough message context for Conpherence search
ClosedPublic

Authored by epriestley on Apr 28 2015, 1:45 PM.
Tags
None
Referenced Files
F13086907: D12589.diff
Thu, Apr 25, 12:46 AM
Unknown Object (File)
Fri, Apr 12, 10:55 AM
Unknown Object (File)
Mar 24 2024, 12:19 AM
Unknown Object (File)
Mar 23 2024, 10:55 PM
Unknown Object (File)
Mar 23 2024, 3:43 PM
Unknown Object (File)
Mar 23 2024, 12:13 PM
Unknown Object (File)
Mar 20 2024, 2:26 AM
Unknown Object (File)
Mar 19 2024, 7:46 PM
Subscribers

Details

Summary

Ref T3165. This is pretty awful looking, but should pull the correct data.

Test Plan

Screen Shot 2015-04-28 at 6.39.51 AM.png (1×1 px, 186 KB)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Implement very rough message context for Conpherence search.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.

Good stuff.

For loadContextMessages, there's a similar problem (the last bits of T7757) but for just a single thread when we need to load something like ZX#YYYY. We need to get the YYYY transaction, a few transactions prior (a few to render plus enough to know if we need a "show older" ui element), and then a standard ish amount of transactions after. (Note we need new "show newer" technology for corner cases where we don't load to the latest.) Anyway, I think this other problem is just solved with two simple queries around YYYY, but bringing it up now just in case.

src/applications/conpherence/query/ConpherenceThreadSearchEngine.php
280–281

I think the possible hole here is if people search for very common words. ...but I agree it seems wildly unlikely in practical terms so whatevs. :D

This revision is now accepted and ready to land.Apr 28 2015, 6:28 PM

Yeah, I think the before + after method is a lot simpler but would cost us like 600 queries per page in the worst case here (100 results * 3 snippets * 2 queries). This is kind of more complex than I'd anticipated, but shouldn't cost very much (average of slightly more than 3 queries -- get-context, get-next-transactions, load-transactions -- hopefully).

This revision was automatically updated to reflect the committed changes.