-
Notifications
You must be signed in to change notification settings - Fork 9
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
Search #18
Comments
Yes, this is a great point. It does seem like we need some way to do basic search—it will be hard to build useful interfaces on top of the API otherwise. To think about some other options here:
I'm starting to think that starting simple (just substrings) and building in a path for extensibility in the future might be the wise way to go. Does that make sense? |
This makes a lot of sense. Do you have specific ideas about how to go about supporting new query types? I suppose it could just be a matter of using different param keys, e.g. |
Sure; that seems cool! We could even consider keeping the |
I've been thinking a bit about AURA client UIs recently and realised that most clients will probably want a single main search box. This makes me think that we could have something like I quite like the idea of filtering and searching being a bit separate, rather than I'm also wondering about the possibility of allowing optional regular expressions for filters/searches for people who want more control over queries, or to allow clients to decide where wildcards should go. However the latter would raise the problem of escaping user input as @sampsyo mentioned earlier. Also I feel like regex might be quite complicated in terms of having a standard syntax. |
Regex would certainly offer the most flexibility to developers of client
applications, but the last time I was thinking through this it seemed
inelegant to handle regex in a URL param. Also there's the issue of which
regex implementation are you supporting, specifically? If we aren't careful
it could lead to server implementations that vary in their handling of this
feature.
Regarding a dedicated search param, the distinction would be that it
matches on all fields at once, and does a substring match on all of them?
Biggest problem I see there is that could be a needlessly expensive
operation - with a more refined query API the client could optimize that
request by only performing substring match on the fields they care about.
I have some ideas since my previous posts I will share soon
…On Wed, Sep 2, 2020, 6:49 AM out-of-range ***@***.***> wrote:
I've been thinking a bit about AURA client UIs recently and realised that
most clients will probably want a single main search box. This makes me
think that we could have something like ?search=foo that looks at all
fields and matches substrings, like @gryphonmyers
<https://github.com/gryphonmyers>' suggestion but without specifying a
field. To get results for all of tracks, albums and artists would still
involve the client making 3 separate requests, but that probably isn't too
bad.
I quite like the idea of filtering and searching being a bit separate,
rather than search being a qualifier of filter. You could have a client
that works just on filtering a whole collection (tracks, albums or artists)
until the user gets what they want, or a client that gets a list of search
results and then allows the user to filter (kind of like shopping websites).
I'm also wondering about the possibility of allowing optional regular
expressions for filters/searches for people who want more control over
queries, or to allow clients to decide where wildcards should go. However
the latter would raise the problem of escaping user input as @sampsyo
<https://github.com/sampsyo> mentioned earlier. Also I feel like regex
might be quite complicated in terms of having a standard syntax.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#18 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMENWCYNM3AS3QYL6OANZ3SDZENZANCNFSM4NFUHF6Q>
.
|
I think in a URL parameter you could pass it through I agree at least basic substring and case-insensitive matching is needed on filters. If the client only cared about certain fields then they could do something like Of course matching 7 fields rather than, say, 3 is going to be more expensive but it's very easy for the server to extract the required information from the URL. For filters the server needs to look through each parameter, see if it matches the Looking forward to your ideas. |
One option might be to have two separate options: a standard query interface using |
On the topic of Complex Queries, as described in the wiki, I think this is fairly important feature to include in any library api, as people tend to need to search for their data. With no form of partial matching available, it may be difficult to provide a good user experience as a client would be limited to predefined options, or rigid search behavior that is only able to render exact matches. I do also agree with the decision to keep the query syntax simple and rooted in basic HTTP syntax though.
How would you feel about supporting basic globbing syntax in query values (or even just the Kleene Star, as that would be the most useful) in field values?
Pros:
Cons:
The text was updated successfully, but these errors were encountered: