BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
15.25k stars 1.9k forks source link

Search exclusions based on Shelf membership #3657

Open hctrr opened 2 years ago

hctrr commented 2 years ago

Describe the feature you'd like

When performing a search it returns results from all Shelves.

Shelf 1: Home -> Book: Recipes -> Page: Sugar Cookies Shelf 2: Web Tech -> Book: Software -> Pages: Clear Browser Cookies Shelf 3: Platforms -> Book: -> Pages: Manipulating Cookies

I would like to exclude all results from the Home shelf but still see the results from Shelf 2 and 3.

an added bonus would be to save my search preferences as well.

Describe the benefits this would bring to existing BookStack users

This request would be equivalent to the current options of "exact matches", however instead of being aware of what the exact match is - i might be more aware of what it isn't.

The ability to search within a book was a great addition, the only challenge is the cross search between multiple shelves that one might have in their wiki.

again, an added bonus would be to save my search preferences as well.

Can the goal of this request already be achieved via other means?

I don't believe - at least not easily done.

Have you searched for an existing open/closed issue?

How long have you been using BookStack?

6 months to 1 year

Additional context

No response

ssddanbrown commented 2 years ago

Hi @hctrr, Within the feature description and the benefits sections of this request are two different idea of what this is, so I'd just like to confirm exactly what you're after here. Here are two elements from your report:

I would like to exclude all results from the Home shelf but still see the results from Shelf 2 and 3.

This request would be equivalent to the current options of "exact matches", however instead of being aware of what the exact match is - i might be more aware of what it isn't.

The first request there is shelf-based exclusion, and I'm assuming you'd imagine that filtering all contents within that shelf, down to the page level? The second request there sounds like exclusions based upon exact content text matches.

Which of those two are you fundamentally asking for here?

hctrr commented 2 years ago

image

in regards to the first item:

(I would like to exclude all results from the Home shelf but still see the results from Shelf 2 and 3.)

Based on the screenshot you can see i searched for "cookies". On the left side, it would be great to be able to exclude Shelf 1 (home) which would then exclude all its books and pages. The end results would be from Shelf 2 and 3.

In regards to the second item:

This request would be equivalent to the current options of "exact matches", however instead of being aware of what the exact match is - i might be more aware of what it isn't.

This was just another attempt of an example, but can see where I caused confusion. In short - I'm aware I want my results from my tech shelves and not my recipes books from the home shelf.

ssddanbrown commented 2 years ago

Okay, thanks for confirming, I have updated the title to specifically relate to shelf-based exclusions.

This kind of search would be more complex than existing filters, due to the nature of books being in multiple shelves and shelves having a looser relation to child contents. We don't have any kind of item-contents-based search filters yet so this also opens up the scope here to others.

Spacefish commented 2 years ago

Guess he is asking for "Faceted search", where "book_name" is a facet which you can have filters on which could be "exclude" filters.