-
Notifications
You must be signed in to change notification settings - Fork 479
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
Combine results with AND #2514
Combine results with AND #2514
Conversation
This seems reasonable to me, but cc @Hetarth02 for a second opinion. |
It looks good to me. But before merging some examples displaying how it has improved search results should be nice. |
The search results @aaruni96 showed were from https://docs.oscar-system.org/ -- and I agree this PR is an improvement... ... even though in the example @aaruni96 shows it makes things worse in so far as the page that I'd be interested in might be this one which documents a method |
A suggestion from my side would be, rather than us deciding the |
I did not notice this until you pointed it out, and yes, the result we want is not among any of the 35 results, and I don't understand why. If you search on this PR for |
I should add that the query I don't know why the change introduced in this PR should make a difference in this regard Screenshot: |
In Google you use to be to search for things like
which means "literal match" And in at least some search engines one used to be able to enter "AND", "OR", etc. in expressions. so you could search "A AND B" to have both occur. Of course that has its own drawbacks, but at least it is simple and quick to explain... But I really wonder: how often do you really search for "things that mentioner A OR B" in a documentation? And if you want that, you can always first search for A and look at the results; then search for B and look at the results. As such I think it makes a lot of sense to have "AND" on by default, and I am not convinced it is a useful user preference to allow allow specifying "OR" somehow -- though I am happy to be proven wrong. But if this was my project to run, I think I'd first switch to "AND" then wait for concrete user feedback/complaints before deciding how to handle "OR" support. But it is not, so ... how shall we proceed? Some way to AND search seems crucial to me, Documenter's search is pretty bad right now in my experience / for my use cases, sadly (no offense intended -- I realize this is a very difficult thing to get right across so many diverse projects) |
What we can do is invite some package maintainers to test the What are your thoughts on this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
I also agree with @fingolfin in that I think AND
makes more sense as the default behavior, and also that allowing users to toggle this behavior is not worth the complexity -- I think it would be very rare for anyone to want to do complex queries in on a documentation page.
As a side note (and maybe this should be documented as its own issue) : how do you fix the formatting / run Prettier.js ? I am not really a webdev and not familiar with the tooling, and couldn't find the answer in Documenter's dev docs / contributing guidelines. |
@aaruni96 Most editors will have some way to install/enable prettier plugin. You can follow this guide, https://prettier.io/docs/en/install. |
Citation needed. |
Yay, all tests pass! |
This makes the search combine input with AND instead of the default OR, which means results get more refined the longer your search string is, not more varied.