Skip to content

Shared queries: combine user search structurally - #9544

Merged
Alkarex merged 1 commit into
FreshRSS:edgefrom
KoseceMehmet:query-structural-search
Nov 8, 2026
Merged

Alkarex merged 1 commit into
FreshRSS:edgefrom
KoseceMehmet:query-structural-search

Conversation

@KoseceMehmet

Copy link
Copy Markdown
Contributor

Follow-up to #9541.

In p/api/query.php, the optional search parameter of a shared user query was appended as a string to the user query's own search, and the result was parsed again.

This keeps both searches as parsed objects and combines them with a structural AND via FreshRSS_BooleanSearch::add(), avoiding the serialise/re-parse round trip. Adds a test for combining Boolean searches with add().

@Alkarex Alkarex added this to the 1.31.0 milestone Nov 8, 2026
@Alkarex
Alkarex merged commit 931a6b3 into FreshRSS:edge Nov 8, 2026
4 checks passed
@Alkarex

Alkarex commented Nov 8, 2026

Copy link
Copy Markdown
Member

Thanks!
And I have just noticed a bug predating this PR, where the user search criteria is lost during paging. Help welcome

@KoseceMehmet

Copy link
Copy Markdown
Contributor Author

Thank you, and yes, you are right. I was able to reproduce the issue locally: in the HTML view of a shared query, the pagination links (“First”, “Previous”, “Next”) were generated without the search parameter. As a result, when a visitor searched within a share and went to the next page, the search was lost and all entries of the share were listed again.

I opened #9545 to fix it: the pagination links now keep the visitor’s search.

Alkarex pushed a commit that referenced this pull request Nov 9, 2026
Fix the paging bug noticed in #9544.

In the HTML view of a shared user query, the pagination links did not include the `search` parameter, so the user search was lost when going to the next page.

The pagination links now keep the user search (URL-encoded). The common part of the URLs is factored out, using `&` consistently.

Tested locally with a shared query of 60 entries and `search=x`: the second page now only shows matching entries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants