Contacts: Search does not include data from "notes", or other properties

Created on 2 Apr 2018  路  20Comments  路  Source: nextcloud/contacts

Steps to reproduce

  1. create Testcontact with Name "Zoe" and with the text "met in London" in the notes. (If you have no other contacts, create at least one more Testcontact with name "Ana", so that when you open the contacts app, Zoe is not selected).
  2. Log out, Log in.
  3. go to contacts app
  4. search for "London" in the top right search field

Expected behaviour

Zoe should be listed.

Actual behaviour

Zoe is not listed.
However, if click on Zoe once, after that the search works as expected and Zoe is listed when searching for London. Also, the search works when you have just created Zoe. Problem only occurs when you log out, or for shared calendars.

Server configuration detail

Operating system: Linux 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64

Webserver: Apache (fpm-fcgi)

Database: mysql 5.7.21

PHP version: 7.1.11-nmm1
Modules loaded: Core, date, libxml, openssl, pcre, zlib, bcmath, bz2, calendar, ctype, dom, hash, filter, ftp, gettext, SPL, iconv, json, mbstring, posix, Reflection, session, standard, shmop, SimpleXML, soap, exif, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlwriter, zip, cgi-fcgi, propro, raphf, http, mysqlnd, PDO, curl, dba, fileinfo, gd, gender, gmp, htscanner, imagick, imap, interbase, intl, ldap, mailparse, mcrypt, mongodb, mysqli, OAuth, odbc, pdo_dblib, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, pspell, recode, sqlite3, tidy, xsl, ionCube Loader

Nextcloud version: 13.0.1 - 13.0.1.1

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: unknown

Signing status

Array

List of activated apps

Enabled:
 - activity: 2.6.1
 - admin_audit: 1.3.0
 - bruteforcesettings: 1.0.3
 - comments: 1.3.0
 - contacts: 2.1.3
 - dav: 1.4.6
 - encryption: 2.0.0
 - federatedfilesharing: 1.3.1
 - federation: 1.3.0
 - files: 1.8.0
 - files_pdfviewer: 1.2.1
 - files_sharing: 1.5.0
 - files_texteditor: 2.5.1
 - files_trashbin: 1.3.0
 - files_versions: 1.6.0
 - files_videoplayer: 1.2.0
 - firstrunwizard: 2.2.1
 - gallery: 18.0.0
 - issuetemplate: 0.3.0
 - logreader: 2.0.0
 - lookup_server_connector: 1.1.0
 - nextcloud_announcements: 1.2.0
 - notifications: 2.1.2
 - oauth2: 1.1.0
 - password_policy: 1.3.0
 - provisioning_api: 1.3.0
 - ransomware_protection: 1.1.0
 - serverinfo: 1.3.0
 - sharebymail: 1.3.0
 - spreed: 3.1.0
 - survey_client: 1.1.0
 - theming: 1.4.1
 - twofactor_backupcodes: 1.2.3
 - updatenotification: 1.3.0
 - workflowengine: 1.3.0
Disabled:
 - calendar
 - files_external
 - systemtags
 - user_external
 - user_ldap

Configuration (config/config.php)

{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "box.alexandermueller.org"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "overwrite.cli.url": "http:\/\/box.alexandermueller.org",
    "dbtype": "mysql",
    "version": "13.0.1.1",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "VWC3w_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "tempdirectory": "\/www\/htdocs\/w017ea8d\/box.alexandermueller.org\/tmp\/",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpmode": "php",
    "mail_smtpauthtype": "LOGIN",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "maintenance": false,
    "updater.secret": "***REMOVED SENSITIVE VALUE***",
    "theme": "",
    "loglevel": 2
}

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: yes

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

LDAP configuration (delete this part if not used)

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your Nextcloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Browser: Firefox 0.0

Operating system:

Logs

Browser log

Insert your webserver log here 

Nextcloud log

Insert your Nextcloud log here

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

1. to develop bug

All 20 comments

Fixed in 3.0.1

Thank you for your work!

Thanks a lot!

@skjnldsv ...weird, I just had this issue again (reproducable) in contacts 3.1.3 Nextcloud 16.0.4

Any information I can provide that would help you?

It does on the current selected contact. Not on the overall list.

@georgehrke can I dav search on carddav?

This issue is still present in NC 18.0.6 and Contacts 3.3.0

Can you please assign it to the next milestone @skjnldsv ?

I feel bad, I just convinced my team to switch to contacts, assuming that this issue has already been fixed. It has been reported more than two years ago, when we were still at NC 13!

Anybody willing to work on this for 鈧偓? Please make an offer.

@skjnldsv please also delete label "enhancement" and add "bug".

For me this is clearly a bug - search works on name, so it should also work in other properties.

@alexanderdd I want to work on it

@imranrrr please do! :)

How much you will pay me in terms of $ @skjnldsv @alexandregv

Lol, this is an opensource project, there is no $ here.

@alexanderdd mention

He want to pay for this job

@imranrrr you have no contact info on your github page. Please contact me at https://alexandermueller.org/en/contact/ Thank you.

@skjnldsv feel free to mark the related comments (including this one) as off topic. No money? Thats the great thing about open source, you can pay someone to do a specific thing.

@alexanderdd We changed the way contacts search functions with Nextcloud 20.
These are the indexed properties: https://github.com/nextcloud/server/blob/master/apps/dav/lib/CardDAV/CardDavBackend.php#L86

These are the searched properties:
https://github.com/nextcloud/server/blob/d9b9de6d7dce51e0511d3b99e2f2b6d0f72cb3d4/apps/dav/lib/Search/ContactsSearchProvider.php#L56

You can add any property from the indexed ones to the search ones. Adding Notes is literally one line of code.

Maybe @skjnldsv can comment whether he will remove the normal search from Contacts and only use the unified search or whether he wants to keep both.

He want to pay for this job

Right, sorry for this. Your comment felt out of place on GitHub. I missed the previous comment by @alexanderdd :)
Sorry for that!

@skjnldsv did you already think about georg's question above?

Maybe @skjnldsv can comment whether he will remove the normal search from Contacts and only use the unified search or whether he wants to keep both.

To me, there is no point in having two searches, and there is no point in keeping the old one if the new one is better.

@georgehrke why not index and search all properties? I would expect a search to return data from all fields in the database, not just a subset.

@georgehrke "Adding Notes [to search index] is literally one line of code."

Please, please do that.

IMO users expect notes to be indexed (as all other data a user enters in their address book?).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

silverhook picture silverhook  路  5Comments

spoorun picture spoorun  路  3Comments

Peque picture Peque  路  3Comments

michaelletzgus picture michaelletzgus  路  5Comments

IamSAB picture IamSAB  路  4Comments