Search: poets and content separately, numbered pages, author filter with Urdu input #50

Merged
anas merged 1 commits from feature/search-results into main 2026-10-08 22:14:49 +00:00
Owner

Owner requests: separate results for poets/writers' names and for content, pagination for content, and filtering by one or several authors with the Urdu keyboard.

Result groups (/search)

  • شعرا و ادبا: poets and writers whose name or pen name has every word (Urdu-normalised, so ي/ی, ك/ک and diacritics do not matter). Each shows years, the number of works and a link to search only their works. Shown on page 1.
  • کتابیں اور ابواب: books and chapters by title, with their poet (e.g. "بانگ درا" finds Iqbal's book).
  • کلام: the content results as before (highlighted matches with their couplet or paragraph).

Pagination: numbered pages (first, last, two either side of the current page, gaps shown as …) with previous/next, and "نتائج ۴۱–۶۰ از ۸۱۱۶".

Author filter

  • Chips for the authors the results come from, with counts (e.g. مرزا غالب ۱۹۲). Ticking one or several narrows the results immediately; selected authors stay first. More than 12 fold under "مزید".
  • A name box for any other poet or writer, with suggestions as you type. It has its own Urdu keyboard and اب (Roman-to-Urdu) buttons; "mir" gives میر and suggests میر تقی میر.
  • The keyboard and Roman typing now work on any input marked data-urdu, not only the search box.
  • Works without JavaScript: the filter is a plain form (repeated poet params).

API: poet=1,2 (several); authors (who the results come from, with counts); poets and books on page 1 (api/src/search.ts).

Tested

  • npm test: 26 pass (names by pen name, books by title, Arabic letter variants, nothing for nonsense).
  • Headless Chrome:
    • "غالب" shows the poets and content groups;
    • "دل" has 8,116 results on 406 numbered pages, and page ۳ shows ۴۱–۶۰;
    • ticking Ghalib narrows to 192;
    • Roman "mir" then picking میر تقی میر gives Ghalib + Mir (608);
    • the on-screen keyboard types "داغ" into the name box (suggests داغ دہلوی) without touching the search box.

Independent of #48 and #49.

🤖 Generated with Claude Code

Owner requests: separate results for poets/writers' names and for content, pagination for content, and filtering by one or several authors with the Urdu keyboard. **Result groups** (`/search`) - **شعرا و ادبا**: poets and writers whose name or pen name has every word (Urdu-normalised, so ي/ی, ك/ک and diacritics do not matter). Each shows years, the number of works and a link to search only their works. Shown on page 1. - **کتابیں اور ابواب**: books and chapters by title, with their poet (e.g. "بانگ درا" finds Iqbal's book). - **کلام**: the content results as before (highlighted matches with their couplet or paragraph). **Pagination**: numbered pages (first, last, two either side of the current page, gaps shown as …) with previous/next, and "نتائج ۴۱–۶۰ از ۸۱۱۶". **Author filter** - Chips for the authors the results come from, with counts (e.g. مرزا غالب ۱۹۲). Ticking one or several narrows the results immediately; selected authors stay first. More than 12 fold under "مزید". - A name box for any other poet or writer, with suggestions as you type. It has its own **Urdu keyboard** and **اب** (Roman-to-Urdu) buttons; "mir" gives میر and suggests میر تقی میر. - The keyboard and Roman typing now work on any input marked `data-urdu`, not only the search box. - Works without JavaScript: the filter is a plain form (repeated `poet` params). **API**: `poet=1,2` (several); `authors` (who the results come from, with counts); `poets` and `books` on page 1 (`api/src/search.ts`). **Tested** - `npm test`: 26 pass (names by pen name, books by title, Arabic letter variants, nothing for nonsense). - Headless Chrome: - "غالب" shows the poets and content groups; - "دل" has 8,116 results on 406 numbered pages, and page ۳ shows ۴۱–۶۰; - ticking Ghalib narrows to 192; - Roman "mir" then picking میر تقی میر gives Ghalib + Mir (608); - the on-screen keyboard types "داغ" into the name box (suggests داغ دہلوی) without touching the search box. Independent of #48 and #49. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
anas added 1 commit 2026-10-08 22:14:28 +00:00
- Results in groups: شعرا و ادبا (by name or pen name, with years, work counts and a 'search in their
  works' link), کتابیں اور ابواب (books/chapters by title), and کلام (content).
- Content pages: numbered pagination (first, last, two either side, gaps) and 'نتائج ۴۱–۶۰ از ۸۱۱۶'.
- Author filter: chips for the authors the results come from, with counts; tick one or several to
  narrow; a name box finds any other poet/writer, with the Urdu keyboard and Roman-to-Urdu typing.
  The keyboard and Roman typing now work on any input marked data-urdu, not only the search box.
- API: poet=1,2 (several), authors with counts, poets and books on page 1 (api/src/search.ts).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anas merged commit 2ceab3164f into main 2026-10-08 22:14:49 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
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: anas/divan#50
No description provided.