contacts
contacts copied to clipboard
Advanced search strings
Users with many contacts (and there are many such Users) would benefit from an advanced search feature.
Zimbra enables users to search by field: Example: #homecountry:Canada Finds all contacts who reside in Canada
And can search mutiple values: Example: NOT #homecity:Vancouver Canada Finds all contacts who have the word Canada mentioned, but don't live in Vancouver
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Nice idea! How should we use the property search string?
I don't like the hash in search, maybe just use like fn:test
kind of string?
Would be easier to implement with unified search filters for 20 :)
@georgehrke, I'm not convinced havingthe search providers in server was the good call :thinking: What do you think? I feel I'm tight to the server version now :/
Well, the problem here is that either way is not perfect. Implementing the search provider in the server requires the server to have knowledge of the routing of the Contacts app. However, implementing the Search provider in Contacts requires you to use private Classes of the dav app. These classes might change at any time, maybe even in a backport of a bugfix.
So the first one is definitely the lesser of two evils.
Well, the problem here is that either way is not perfect. Implementing the search provider in the server requires the server to have knowledge of the routing of the Contacts app. However, implementing the Search provider in Contacts requires you to use private Classes of the dav app. These classes might change at any time, maybe even in a backport of a bugfix.
So the first one is definitely the lesser of two evils.
I could also just use the contacts manager classes from OCP ?
I could also just use the contacts manager classes from OCP ?
Only with modifications to the OCP\Contacts classes. When implementing the search provider, I extended the Backend to allow searching all address-books of a user at once. https://github.com/nextcloud/server/pull/22011/files#diff-cec75d1f60809c8d36dd837cfdc60531R996
The pagination capabilities of OCP are very limited. At the moment, it just applies the limit/offset to each addressbook and returns all results: https://github.com/nextcloud/server/blob/master/lib/private/ContactsManager.php#L48L62
The pagination capabilities of OCP are very limited. At the moment, it just applies the limit/offset to each addressbook and returns all results:
So, what do you think we should do? Leave it as is?
I would just leave it as is. The only real downside is that you are stuck to the server release schedule, when it comes to adding new search features. But since there is a new server major every 4 to 5 months, i would say that's acceptable.