Bug
tryHandleAuthorSearch in src/lib/search/strategies/authorSearchStrategy.ts:26 uses a non-global regex to extract only the first by: token. The replacement at line 33 consumes surrounding whitespace, causing the second by: token to be concatenated with the preceding text.
Steps to reproduce
Search for: bitcoin by:dergigi by:odell
Expected
Results from both dergigi and odell containing "bitcoin".
Actual
Console error: BUG: No filters to merge! {}
No results returned.
Root cause
// Line 26 — only matches FIRST by: token
const authorMatch = cleanedQuery.match(/(?:^|\s)by:(\S+)(?:\s|$)/i);
// Line 33 — replacement eats surrounding spaces, mangling the rest
const terms = cleanedQuery.replace(/(?:^|\s)by:(\S+)(?:\s|$)/i, '').trim();
For bitcoin by:dergigi by:odell:
author = dergigi (only the first)
terms = bitcoinby:odell (space between "bitcoin" and "by:odell" was consumed by the regex)
Suggested fix
Extract all by: tokens with a global regex, resolve them in parallel, and strip them cleanly from the residual search text.
Tracked as ants-h9w.
Bug
tryHandleAuthorSearchinsrc/lib/search/strategies/authorSearchStrategy.ts:26uses a non-global regex to extract only the firstby:token. The replacement at line 33 consumes surrounding whitespace, causing the secondby:token to be concatenated with the preceding text.Steps to reproduce
Search for:
bitcoin by:dergigi by:odellExpected
Results from both dergigi and odell containing "bitcoin".
Actual
Console error:
BUG: No filters to merge! {}No results returned.
Root cause
For
bitcoin by:dergigi by:odell:author=dergigi(only the first)terms=bitcoinby:odell(space between "bitcoin" and "by:odell" was consumed by the regex)Suggested fix
Extract all
by:tokens with a global regex, resolve them in parallel, and strip them cleanly from the residual search text.Tracked as
ants-h9w.