Skip to content
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

Support searching and sorting #6

Open
einarf opened this issue Jun 22, 2019 · 3 comments
Open

Support searching and sorting #6

einarf opened this issue Jun 22, 2019 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@einarf
Copy link
Member

einarf commented Jun 22, 2019

Some notes on searching is mentioned in the advanced section:
https://docs.cachethq.io/docs/advanced-api-usage#section-searching

What fields support sort and order is not well documented. Needs more investigation looking at the source.

@einarf
Copy link
Member Author

einarf commented Jun 26, 2019

API Views we need to look at:
https://github.com/CachetHQ/Cachet/tree/2.4/app/Http/Controllers/Api

@einarf einarf changed the title Support searching Support searching and sorting Feb 20, 2020
@einarf einarf added this to the 3.2.0 milestone Sep 9, 2020
@einarf einarf added the enhancement New feature or request label Sep 9, 2020
@sedan07
Copy link

sedan07 commented Jan 19, 2021

Started working on this feature as I needed the search functionality. However it appears the search functionality is broken in Cachet 2.3 when applied with pagination, same applies to 2.4..

With a patched version of 2.3 or the forked and continued version 2.5 the following code enables searching Incidents and Components: https://github.com/fiveai/cachet-client/tree/support-searchable-list-query

Not sure if this is the best way to approach this? Any thoughts and pointers would be appreciated.

@einarf
Copy link
Member Author

einarf commented Jan 19, 2021

This explains quite a bit. I did play around with this for a bit and ran into some trouble as well. I think the sorting works ok (for the supported fields). Searching is another story. Would it maybe make sense to have a Filter instead of a Searchable to support both sorting and searching? (or possibly separate classes)

It really is a puzzle sometimes when trying to get these things running with all cachet versions. How something ends up is almost related to these limitations. I was really just planning to add some keyword arguments myself and experiment with what was possible in 2.3 and 2.4+ before making it more fancy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants