-
Notifications
You must be signed in to change notification settings - Fork 300
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
advanced querying #35
Comments
Sorting implemented client side, but I think we need to determine filtering on the server side and pass back only matches that are significant. |
We can achieve this by implementing a server-side API that our frontend queries to get back filters/sorts. |
Our "frontend" can be integration of this API with datatable's support for server-side operations. |
Implement custom/advanced querying |
My opinion of this is that it's not going to be used a lot, and will require a lot of indexes and work to build an interface. Albert still wants to give it a shot, so reassigning. |
There are two parts to this:
|
Advanced querying also includes aggregating the results for these kinds of queries. There are two types of queries, ones that are predefined by YASP and we build something with the data, like a histogram, or nick's ward map, and ones that users build using some custom UI. A key difference between automatic and manual queries is that automatic queries can occur on the server side prior to rendering data back to the user. Custom queries require hitting an API endpoint and sending back results. Examples of automatic queries (We already build histograms of match duration and GPM) Examples of custom queries: After the result of an advanced query, we want two things back: Part 1 is building the functions to return these desired results for some given query. Sorting: As long as the result set size is under 16MB (MongoDB's maximum) we can sort/filter on JS side (which is better since it doesn't require an index anyway). |
Taking a stab at this :) |
so I think this is actually two separate things:
|
I think I've done pretty much all I want to do with this, by adding a hero filter on the player trends page. The result is basically aggregattion by player, with an additional optional filter by hero. If we add too many more filters, the dataset will be too small to draw any meaningful conclusion. If we want to provide some kind of aggregation api that works across players, I think we'll need to build a second api endpoint. We can't use the current /api/matches endpoint as that has to be limited heavily (in terms of n) in order to prevent abuse, as it can return full matches (which are 200kb each). |
guess I will give this another shot. Current plan of attack: Player matches page can use this endpoint to populate matches? Possibly trends can be adapted to use this as well. The problem with using datatables to interface with the api is that the query string suddenly gets a lot harder to build. Maybe we can add jQuery helpers to construct the query and use it for both matches tab (lists matches, reports winrate fitting the advanced query conditions) and trends tabs (aggregates data fitting the advanced query conditions) |
I'm happy with the basic implemenation we have now. We can add more filters incrementally if users request them. Over to Albert for styling. |
framework is there for additional options to be added. |
Allow users to sort/filter their matches.
Filter matches by significant game modes only.
Detect no stats recorded matches and disregard.
The text was updated successfully, but these errors were encountered: