Commit Graph

69 Commits

Author SHA1 Message Date
MauBiBot bce3258325 fix forum search route and rebuild compiled assets 2026-04-22 19:05:46 +02:00
MauBiBot 7f282cdb84 merge local search fixes after pull 2026-04-22 18:56:43 +02:00
MauBiBot e7e4495306 rebuild compiled JS assets for analyzer selector 2026-04-22 16:36:24 +02:00
mueh 0fa8fb92eb ai forgot to commit 2026-04-22 15:47:54 +02:00
Bart van Bragt e92307cf16 build: commit compiled JS dist files for feat/analyzer-refactor branch 2026-04-16 22:07:28 +02:00
Bart van Bragt d27d71ff72 style: apply prettier formatting to admin/index.ts 2026-04-16 11:57:59 +02:00
Bart van Bragt f7d9935fb9 feat: suppress ES instant results when search-post-bodies is enabled
When searching inside comments is ON, the autocomplete dropdown now returns
nothing from ES (only usernames show). This avoids showing title-only matches
that are inconsistent with the full comment-body search results.

Also passes filter[autocomplete]=1 to the API so the server uses the fast
title.autocomplete path instead of the full has_child query.
2026-04-16 11:57:34 +02:00
Bart van Bragt 33d4946947 feat: stem exclusion admin setting and analyzer language selector improvements
Add a stem-exclusion textarea to the admin settings page. Words entered here
(one per line) are passed as stem_exclusion to the language analyzer, preventing
them from being stemmed. Requires a full re-index to take effect.

The two language-dependent fields (stem exclusion, min search length) are
disabled when CJK is selected, since neither applies to bigram analysis.

Settings are reordered: search-scope switches now appear above the language
block so the language-dependent fields sit directly below the language selector.

Replace the lowercase ES identifier labels in the language dropdown with proper
display names (e.g. "Brazilian Portuguese", "CJK (Chinese, Japanese, Korean)",
"Sorani (Kurdish)"). Drift detection now tracks stem exclusion instead of the
removed min_gram index setting.
2026-04-16 11:52:34 +02:00
Bart van Bragt c55db0abd6 fix: show TerminalPost in search results when field sort is active or mostRelevantPost is unavailable
When params.q is set, Flarum core suppresses TerminalPost and only shows an
excerpt from mostRelevantPost. This leaves the info section empty when the post
is null (e.g. hidden/deleted first post in production) or when results are
ordered by a field sort where an excerpt is meaningless.

Extend DiscussionListItem.infoItems to:
- Replace excerpt with TerminalPost when a field sort (latest, oldest, top) is
  active — relevance excerpts are not meaningful when sorted by date/count.
- Fall back to TerminalPost when no excerpt was added (mostRelevantPost null).
2026-04-15 21:24:55 +02:00
Bart van Bragt c5643bed31 fix: default search sort to latest and keep dropdown label in sync
- Search with no explicit sort now defaults to latest (updated_at desc)
  on both backend and frontend, matching the forum UX expectation.
- "All discussions" link from the search box routes to /?q=...&sort=latest
  so the sort dropdown shows "Latest" immediately after submission.
- extendDiscussionState injects sort=-lastPostedAt into API params when
  no sort is present, keeping direct-URL navigation (?q=anan) consistent
  with the backend default.
- Backend guard changed from phpSortField===null to empty($sorts), which
  is the correct sentinel since $sorts is the authoritative ES sort list.
2026-04-15 17:21:10 +02:00
Bart van Bragt bf37e01eb0 fix: read forum attribute lazily inside extend callback 2026-04-14 09:33:17 +02:00
Bart van Bragt 4709b9d1db fix: is_hidden boolean coercion and forum settings access 2026-04-14 08:59:19 +02:00
Bart van Bragt f486292f15 feat: make ngram min_gram configurable via admin setting
Adds a 'Minimum search query length' setting (1–4, default 3). The admin
shows a warning when the analyzer or min-search-length have changed since
the last index build.
2026-04-10 13:19:22 +02:00
Bart van Bragt 4412583cd9 chore: fix prettier formatting and npm audit vulnerabilities
Reformat admin/index.ts to satisfy prettier checks. Update package-lock.json
via npm audit fix to resolve 17 vulnerabilities in transitive dev dependencies
(webpack, babel, lodash, ws, semver, etc.).
2026-04-10 11:47:38 +02:00
Bart van Bragt 81e7b6502d feat: Show admin dashboard notice when search index needs rebuilding
After a mapping change (e.g. the parent-child restructure), existing installs
need to rebuild their index. A DashboardWidget appears on the admin page
warning the admin and showing the command to run. Compatibility is tracked
via the blomstra-search.index-compatible setting.
2026-04-10 11:10:53 +02:00
flarum-bot f981c27e00 Bundled output for commit f6503f5e6a
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-01-30 22:17:40 +00:00
Daniël Klabbers f6503f5e6a fix: #10, private forums have no discussions key, throws error 2023-01-30 23:17:01 +01:00
flarum-bot ad92d8856b Bundled output for commit 8b519619e5
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-24 09:39:12 +00:00
Daniël Klabbers 83afe95d61 chore: fix search and seeding 2022-11-24 10:37:57 +01:00
Daniël Klabbers 846cc348ff Merge branch 'dk/search-improvements' into main 2022-11-24 10:29:18 +01:00
flarum-bot b60563f2ec Bundled output for commit 703cbbdd48
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-21 15:33:18 +00:00
David Wheatley 703cbbdd48
fix: incorrect JS package name 2022-11-21 15:32:22 +00:00
flarum-bot 769b6cd278 Bundled output for commit f500d7f956
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-21 12:38:34 +00:00
Ian Morland f500d7f956 fix: revert back to not using the elastic endpoint for filtering, at least until we support tags in the search database 2022-11-21 12:37:52 +00:00
flarum-bot 7257d5fb34 Bundled output for commit 09fb4e8b7b
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-18 09:39:40 +00:00
Ian Morland 23dd403417 fix: override endpoint not used correctly 2022-11-18 09:29:19 +00:00
flarum-bot 4240269b7f Bundled output for commit c186535bbb
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-18 08:31:43 +00:00
Ian Morland 4d2c5cb22f chore: bump deps, npm audit fix 2022-11-18 08:26:26 +00:00
Daniël Klabbers 4bc89949ec complete testing 2022-11-10 12:54:26 +01:00
Daniël Klabbers 29ba864849 settings configurations 2022-11-09 18:06:48 +01:00
flarum-bot aabba9c2d0 Bundled output for commit 886e78d6fb
Includes transpiled JS/TS.

[skip ci]
2022-05-03 08:15:09 +00:00
Ian Morland 886e78d6fb Format js 2022-05-03 09:13:50 +01:00
Ian Morland af85834a5a Webpack 5 2022-05-03 09:13:10 +01:00
flarum-bot 2d989c7bbc Bundled output for commit ca229c8af8
Includes transpiled JS/TS.

[skip ci]
2021-12-13 11:07:39 +00:00
Daniel Klabbers ca229c8af8 possibly reduce logging 2021-12-13 12:06:26 +01:00
Daniel Klabbers 868713da11 fix: search for byobu page
Fixes the index for byobu.
2021-11-16 20:22:22 +01:00
Daniel Klabbers 87f695484b compiled 2021-11-11 13:12:42 +01:00
Daniel Klabbers 5600236bb8 exclude byobu from elastic for now 2021-11-11 13:12:36 +01:00
Daniel Klabbers cc9c57308e re enable search, cleanup 2021-11-11 13:12:17 +01:00
Daniel Klabbers 050482dd4a fix calling xhr still 2021-11-10 14:39:47 +01:00
Daniel Klabbers bad10ef03d only override the search on the frontend if its not already been handled by the backend to prevent duplicate queries 2021-11-10 13:36:34 +01:00
Daniel Klabbers a03de74f0b clean up js 2021-11-10 12:39:41 +01:00
flarum-bot 53651328bb Bundled output for commit 8fb79e6e2f
Includes transpiled JS/TS.

[skip ci]
2021-11-02 13:36:05 +00:00
Daniel Klabbers 254c58101b indexing now works using language processing 2021-11-02 12:07:27 +01:00
David Wheatley c96a0f54bf
fix: indexpage search not hitting custom endpoint 2021-10-31 22:47:46 +00:00
Daniël Klabbers 61e2f90835 wip 2021-10-31 02:53:16 +02:00
Daniël Klabbers 6c045ab595 wip 2021-10-30 13:01:51 +02:00
Daniel Klabbers 12bc9d74e0 wip 2021-10-29 10:42:57 +02:00
Daniël Klabbers 07a1e9dc44 wip 2021-10-27 08:02:07 +02:00
flarum-bot 7feec2ffd4 Bundled output for commit 70bffb7aa0
Includes transpiled JS/TS.

[skip ci]
2021-10-22 17:59:23 +00:00