Search: names from the server, posts from a local index #154

Closed
opened 2026-10-19 10:09:14 +00:00 by littlefox · 2 comments
Owner

From the 0.4 roadmap ("Find your people").

lyskomd has no full-text or subject search: Protocol A can look up names (persons and channels: lookup-z-name, re-z-lookup) but nothing about texts. So:

  • Server lookups: people and channels by name or regexp. The command palette already does names; this brings it into a search view.
  • A local index of the posts you have read or fetched (subject, author, body): IndexedDB in the browser and a file on desktop, kept to a size limit.
  • Results show channel, author, date and a snippet, and open the post in the thread view.
  • The search view says plainly what it covers ("posts you've read on this device") and what it doesn't.

Size L. Questions to settle in the design: what to index (bodies or only subjects), how big the index may get, and whether "fetch and index a channel's history" is offered, bounded and only on request (D-007: no hammering the server).

e2e: find a read post by a word in its body; names found from the server; the coverage note shown.

From the 0.4 roadmap ("Find your people"). lyskomd has no full-text or subject search: Protocol A can look up **names** (persons and channels: `lookup-z-name`, `re-z-lookup`) but nothing about texts. So: - **Server lookups:** people and channels by name or regexp. The command palette already does names; this brings it into a search view. - **A local index** of the posts you have read or fetched (subject, author, body): IndexedDB in the browser and a file on desktop, kept to a size limit. - Results show channel, author, date and a snippet, and open the post in the thread view. - The search view says plainly what it covers ("posts you've read on this device") and what it doesn't. Size L. Questions to settle in the design: what to index (bodies or only subjects), how big the index may get, and whether "fetch and index a channel's history" is offered, bounded and only on request (D-007: no hammering the server). e2e: find a read post by a word in its body; names found from the server; the coverage note shown.
Author
Owner

Plan, taking the open questions from the issue with sensible defaults (say if you want them different):

  • People and channels: found by name from the server, the way the palette does it.
  • Posts: a local index of what this device has fetched anyway (read, previewed, in threads): subject, author, channel, date, and the body text. No background crawling of the server (D-007), and nothing is fetched just to index it.
    • Browser: IndexedDB. Desktop: a file in the data directory.
    • Capped at 20 000 posts, oldest dropped first. Cleared on logout from that account.
  • Matching: all words in any order, any case, å/ä/ö kept distinct. Results newest first, with a snippet where the words hit, opening in the thread view.
  • The search view says plainly: 'Söker i N inlägg som den här enheten har läst. Hela servern går inte att söka i.'
  • Later, only if you want it: 'Hämta och indexera kanalens senaste 500 inlägg', on request, paced like the channel directory's statistics.
Plan, taking the open questions from the issue with sensible defaults (say if you want them different): - **People and channels:** found by name from the server, the way the palette does it. - **Posts:** a local index of what this device has fetched anyway (read, previewed, in threads): subject, author, channel, date, and the body text. No background crawling of the server (D-007), and nothing is fetched just to index it. - Browser: IndexedDB. Desktop: a file in the data directory. - Capped at 20 000 posts, oldest dropped first. Cleared on logout from that account. - **Matching:** all words in any order, any case, å/ä/ö kept distinct. Results newest first, with a snippet where the words hit, opening in the thread view. - **The search view says plainly:** 'Söker i N inlägg som den här enheten har läst. Hela servern går inte att söka i.' - **Later, only if you want it:** 'Hämta och indexera kanalens senaste 500 inlägg', on request, paced like the channel directory's statistics.
Author
Owner

Merged in #171.

  • Names from the server: people and conferences.
  • Read posts from a local index of what the device has fetched anyway: capped at 20 000, IndexedDB or a file, cleared on logout. Nothing is fetched just to index it.
  • Matching: all words, newest first, with snippets.
  • The view: 'Sök' under Alla kanaler, the palette, or /. It says what it covers.

Verified: search.spec on desktop, Android and iPhone (find by body words, a person by name, open a hit, kept after a reload, gone after logout); the full suite; CI green.

Merged in #171. - **Names from the server:** people and conferences. - **Read posts from a local index** of what the device has fetched anyway: capped at 20 000, IndexedDB or a file, cleared on logout. Nothing is fetched just to index it. - **Matching:** all words, newest first, with snippets. - **The view:** 'Sök' under Alla kanaler, the palette, or /. It says what it covers. Verified: search.spec on desktop, Android and iPhone (find by body words, a person by name, open a hit, kept after a reload, gone after logout); the full suite; CI green.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
littlefox/neokom#154
No description provided.