-
Notifications
You must be signed in to change notification settings - Fork 563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Combine "Search from current article" and "Search whole wiki" #900
Conversation
Codecov Report
@@ Coverage Diff @@
## master #900 +/- ##
==========================================
- Coverage 74.28% 74.25% -0.04%
==========================================
Files 106 106
Lines 4340 4358 +18
==========================================
+ Hits 3224 3236 +12
- Misses 1116 1122 +6
Continue to review full report at Codecov.
|
That sounds interesting! Btw you can merge querysets like this:
This is the same as |
And I think it would work great by for instance combining with
|
Hey @Mortal og @neic - any updates on this? Would love to get it merged in, just worried about the situation with duplicate stuff. For instance if you search the "root" article and then you get confusing results from "root" and the whole wiki at once. So would be nice to combine two different querysets and somehow be able to remove duplicates from the "whole wiki" set such that it's actually "other results from the rest of the wiki". |
I'm currently busy with work, so I haven't had the energy to work on this for a while. I'll pick it up again eventually - feel free to either close this or let it stay open. Wrt. duplicate stuff, I could imagine only doing the combination if "search from current article" does not give a lot of results (say, more than 50) - in that case, we can just exclude the matched pages by id in the "whole wiki" queryset. |
I think it is a nice change, please feel encouraged to have time :) Maybe we could make use of the already existing structure and just offer the user a link to jump back and forth between to different search types?
So, currently by default if you are viewing If we add the originating article as a querystring parameter, we could retain where the user was coming from?
In the case of displaying a link, we could perform a count on the search results. E.g. "View search results ONLY in Article Title (123 results)". This is easy to implement, because it doesn't require considering the size of the result query sets or to have to combine them or merge them in the pagination :) |
Hi @Mortal - thanks for starting the work on this. I suppose you didn't have time to finish it. You're always welcome to re-open the PR or start a new one in case you want to continue this effort! |
Currently, the search field at the top of every wiki article only searches articles below the currently viewed article. On my wiki it is rarely useful to search under the current; it would be preferable that the search page shows results from the entire wiki.
I'd suggest merging "Search from current article" and "Search whole wiki" so that the search results page displays first the results under the current article, and then displays results from the whole wiki.
I'll work on an implementation in this PR.