h icon indicating copy to clipboard operation
h copied to clipboard

When searching for multiple groups, allow for use of OR instead of AND

Open klemay opened this issue 6 years ago • 1 comments
trafficstars

User story

As a Hypothesis-on-the-web user, I want to run a query at https://hypothes.is/search that shows me annotations from multiple groups.

Additional information

As discussed in Slack, it would be nice to enable OR searches for group queries.

Presently, queries are joined by AND so that each additional term narrows my search: Screen Shot 2019-08-16 at 1 15 17 PM (Resolves to https://hypothes.is/search?q=group%3AMndm6GvX+group%3A62V5MKkV)

This doesn't really make sense for group queries, since an annotation can't possibly exist in group1 AND group2.

Whether we'd want to default to use of OR for group queries or simply allow for it is a technical design question that could be addressed when it's time to propose an implementation.

EDIT: Adding a ticket from Zendesk .- where a user was trying to do something like:

user:me OR group:a OR group:b etc...

Reason: User wants to see his personal notes and the notes of anyone in any groups he's in.

Also, when this change is made we should update any dev + user facing docs to reflect this.

klemay avatar Aug 16 '19 17:08 klemay

Maybe roll this an epic that reviews and documents all the search syntax. There are various questions to answer, and things to document. For example, consider:

https://hypothes.is/search?q=real+crime+being+committed https://hypothes.is/search?q=%22real+crime+being+committed%22

Both yield 2 results. The first matches the quoted string, the second doesn't. Can't remember if we used to honor the quotes, but we evidently don't now.

judell avatar Aug 16 '19 17:08 judell