[PR #5402] [CLOSED] Allow api search to filter by book_id and chapter_id #6491

Closed
opened 2026-02-05 10:33:38 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/5402
Author: @helderjsm
Created: 1/10/2025
Status: Closed

Base: developmentHead: search_filter_bookid_chapterid


📝 Commits (1)

  • 5e2bff8 Allow search to filter by book_id and chapter_id

📊 Changes

2 files changed (+33 additions, -0 deletions)

View changed files

📝 app/Search/SearchRunner.php (+14 -0)
📝 tests/Entity/EntitySearchTest.php (+19 -0)

📄 Description

In Api we should be able to search by book_id and or chapter_id to reduce the set of results.

Example search using book_id filtering:
http://localhost:6875/api/search?count=100&page=1&query=p{type:page}{book_id:5}
Example search using chapter_id filtering:
http://localhost:6875/api/search?count=100&page=1&query=p{type:page}{chapter_id:2}


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/5402 **Author:** [@helderjsm](https://github.com/helderjsm) **Created:** 1/10/2025 **Status:** ❌ Closed **Base:** `development` ← **Head:** `search_filter_bookid_chapterid` --- ### 📝 Commits (1) - [`5e2bff8`](https://github.com/BookStackApp/BookStack/commit/5e2bff813292bcec1da3d2709fca62304f776ae0) Allow search to filter by book_id and chapter_id ### 📊 Changes **2 files changed** (+33 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `app/Search/SearchRunner.php` (+14 -0) 📝 `tests/Entity/EntitySearchTest.php` (+19 -0) </details> ### 📄 Description In Api we should be able to search by book_id and or chapter_id to reduce the set of results. Example search using book_id filtering: http://localhost:6875/api/search?count=100&page=1&query=p{type:page}{book_id:5} Example search using chapter_id filtering: http://localhost:6875/api/search?count=100&page=1&query=p{type:page}{chapter_id:2} --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:33:38 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6491