ement.el icon indicating copy to clipboard operation
ement.el copied to clipboard

Server-side search

Open phil-s opened this issue 1 year ago • 1 comments

It would be nice to have support for server-side search in Ement.el.

@alphapapa​ commented in chat:

What's needed is support for the events API so that when we show a message from a search result we can show the surrounding context.

(The Event Context provided with each result (if requested) contains those surrounding events_before and events_after.)

phil-s avatar Jul 31 '24 06:07 phil-s

Yeah, that much could be done quickly. What I meant to say is that we need to be able to jump to an arbitrary event in a room and then go forward/back in the timeline, loading other events as needed, and possibly integrating them with the timeline we already have for the room. If the search feature were limited to just seeing the matching event and a few on either side of it, it would feel very limiting. So we need more comprehensive support for the events API, integrating it with existing functionality (that would also facilitate bookmarking events in rooms and then jumping back to them).

And similarly to how the matrix-js-sdk maintains and joins together multiple timelines for a room, we might need to implement something like that (otherwise we would probably end up dumping old events into the timeline with recent events, and possibly having to sort the whole list of events periodically, which could be a performance issue); i.e. we might need some kind of API that abstracts over a room's timeline that may have arbitrary gaps.

alphapapa avatar Jul 31 '24 06:07 alphapapa