#459 Search every timeline, moment and duration from Explore
–
- github
- github/openchronology/timeline-app
- github/openchronology/timeline-app#459
- issue
- state:closed
The search on the Explore page finds timelines only. It should find every item on the site: timelines, moments and durations, by their titles and descriptions. It's a prerequisite for #422 (PR #457): linking to an entity on another timeline means finding that entity first. ## The search - **One full-width search field** heads Explore timelines (at `/explore`, and `/` when the landing page is off). It searches timelines, moments and durations together. - **Filters are hidden by default**, behind a **Filters** button that says how many are on: - **Show:** timelines, moments, durations (all by default); - **Tag:** timelines with the tag, and moments and durations with it; - **Search in:** the whole library (default) or only my timelines; - **Sort** for the timelines. - **Results** with search text: - **Timelines:** the cards as now, which can still be picked to compare; - **Moments and durations:** a list. Each shows its kind, title (opening its page), time in its timeline's own display, the timeline and its owner, and a snippet of its notes. The list has its own pager. - Without search text the list browses public timelines as now; moments and durations need search text. - **The address carries everything**, so a search can be linked to and works without JavaScript: the existing `search`, `tag`, `sort` and `page`, plus `show`, `within` and `entityPage`. With JavaScript it searches in place, as the timeline lists do (#338). ## What it searches - **Who sees what:** - signed out: public timelines only; - signed in, whole library: public timelines plus the reader's own and those they're a member of (members don't see a timeline restricted by moderators); - only my timelines: the reader's own. - **Moments and durations** match like a timeline's own search (#19): word prefixes against title (weighted most) and notes. Matches are ranked, and established accounts' come first, as for timelines (#103). - **Labelled timelines** (#115): their moments and durations are listed only to signed-in adults. - **Forks** that read through to their source show only what they changed; the rest is found on the source. - **Cost:** each search ranks at most 5,000 matching entities, so one common word costs the same on a large site. A search past that says "5,000+". ## API `POST /api/timelines/entities/search` takes `{search, kinds, tag, scope, owner, page, limit}` and returns a page of moments and durations, each with its timeline, plus `total` (and `totalMore` past the cap). Explore's timelines still use `POST /api/timelines/search`. ## After this #457's **Link to another timeline** searches moments, durations and timelines across every timeline the user can edit in one step, rather than picking a timeline first. https://github.com/openchronology/timeline-app/issues/459
Related
- #103 reputation system for users? "popularity" metric?
- #115 how should mature content be handled?
- #19 Text Search for entities on a timeline
- #338 A much better timeline browser: in-place search and sort, no reloads, better cards
- #422 foreign references
- #457 Moments and durations link to entities on other timelines, or to other timelines (#422)
- #460 Explore searches every timeline, moment and duration, with the words highlighted (#459)
- Merge the faster search of events (#459)
- Merge the search of every timeline, moment and duration (#459), which linking builds on
- Merge the platform test's fix (#459)
- One picker for relating and linking: Explore's search, or a pasted address
- Merge pull request #460 from openchronology/feature/459-site-search
- Explore searches every timeline, moment and duration, with the words highlighted (#459)
Open #459 Search every timeline, moment and duration from Explore in the timeline