Ref T3165. This is pretty awful looking, but should pull the correct data.
Details
- Reviewers
btrahan - Maniphest Tasks
- T3165: Provide Search in Conpherence
- Commits
- Restricted Diffusion Commit
rPcd7fec1729fe: Implement very rough message context for Conpherence search
Diff Detail
- Repository
- rP Phabricator
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
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 |
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).