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

Autocomplete/get needs pagination #12322

Closed
mario opened this issue Nov 6, 2018 · 11 comments
Closed

Autocomplete/get needs pagination #12322

mario opened this issue Nov 6, 2018 · 11 comments

Comments

@mario
Copy link
Contributor

mario commented Nov 6, 2018

No description provided.

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #2231 (Need to be renamed...), #11119 (Need help - getting spammed with: OCP\Encryption\Exceptions\GenericEncryptionException: Bad Signature), #11198 ("Get your own free account"), #9709 (How to get rid of .htaccess ?), and #14 (Getting CI up and running).

@MorrisJobke
Copy link
Member

@mario A little bit more detail would be awesome. I extrapolate you are talking about an OCS API endpoint, right?

@MorrisJobke
Copy link
Member

cc @blizzz @nickvergessen @rullzer

@mario
Copy link
Contributor Author

mario commented Nov 7, 2018

@MorrisJobke apologies for the short issue. Indeed, I'm talking about the ocs endpoint that goes by /autocomplete/get which currently only has limit and lacks real pagination.

@nickvergessen maybe wants to take a different approach to this in the client (e.g. not show all users at all, but only when you filter) so if that's the general consensus, feel free to close the issue.

@blizzz
Copy link
Member

blizzz commented Nov 7, 2018

@mario yes, I did not include pagination intentionally. Do you have a use case? If the results are too many, perhaps the search was not specific enough? The purpose was auto-completing, not listing.

@rullzer
Copy link
Member

rullzer commented Nov 7, 2018

I think in all the other cases we just load 30 or so results. And then you have to enter more to get more precise results. If you have 30 entries that are exactly then having 100 won't help I guess ;)

Also. There is a technical reason for this. As we have multiple backends we query pagination is putting a higher load on the server.

@mario
Copy link
Contributor Author

mario commented Nov 7, 2018

@blizzz @rullzer I understand. In some of the Nc14 installations (I haven't been able to debug this further) the sharing API would return no contacts - this worked prior to 14.

Switching to autocomplete endpoint solves the problem, but like I said - I can't paginate which is ... problematic :)

@mario
Copy link
Contributor Author

mario commented Nov 7, 2018

Like I said - you know more about this stuff. Feel free to close if it doesn't make sense.

@nickvergessen
Copy link
Member

Yeah as the data comes from multiple providers I think it's too complicated to do a proper pagination which is not "get all into an array and then array_slice".
So I don't see this happening.

@MorrisJobke
Copy link
Member

Yeah as the data comes from multiple providers I think it's too complicated to do a proper pagination which is not "get all into an array and then array_slice".
So I don't see this happening.

But isn't this fine? #10880 does it as well. 🤔

@blizzz
Copy link
Member

blizzz commented Nov 8, 2018

We also do it on the user management page. The pagination works per backend. If you have three user sources and request 10 of page 3, you'll get up to 30 results. That's the only reliable way, but it works.

The question is rather whether we want offer expose an easy way of numerating users to (unauthed?) users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants