Sorting of search results for events
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
Steps to reproduce
- Create a calendar and create an event in the past.
- Subscribe to a public ICS calendar that uses similarly named events, but for the current month.
- Search for an event name that is common in both calendars.
Expected behaviour
The search results should be sorted by date, starting from today.
Actual behaviour
2012 events from the nextcloud calendar are sorted before 2020 events from the subscribed calendar.
Calendar app
Calendar app version: 2.1.2
Client configuration
Browser: Firefox 83
Operating system: Ubuntu 20.04
Server configuration
Operating system: official nextcloud docker image for version 20.0.1
Web server: (e.g. Apache, Nginx,...)
Database: (e.g. MariaDB, SQLite or PostgreSQL)
PHP version: (e.g. 7.0.3)
Nextcloud Version: 20.0.1
Updated from an older installed version or fresh install: updated
List of activated apps:
Enabled:
- accessibility: 1.6.0
- activity: 2.13.2
- admin_audit: 1.10.0
- announcementcenter: 4.0.0
- apporder: 0.11.0
- audioplayer: 3.0.0
- audioplayer_editor: 0.3.0
- bruteforcesettings: 2.0.1
- calendar: 2.1.2
- cloud_federation_api: 1.3.0
- comments: 1.10.0
- contacts: 3.4.2
- contactsinteraction: 1.1.0
- dav: 1.16.0
- deck: 1.2.1
- event_update_notification: 1.1.0
- federatedfilesharing: 1.10.1
- federation: 1.10.1
- files: 1.15.0
- files_accesscontrol: 1.10.1
- files_automatedtagging: 1.10.0
- files_downloadactivity: 1.9.0
- files_pdfviewer: 2.0.1
- files_sharing: 1.12.0
- files_trashbin: 1.10.1
- files_versions: 1.13.0
- files_videoplayer: 1.9.0
- firstrunwizard: 2.9.0
- groupfolders: 8.1.1
- issuetemplate: 0.7.0
- logreader: 2.5.0
- lookup_server_connector: 1.8.0
- metadata: 0.12.0
- nextcloud_announcements: 1.9.0
- notes: 4.0.0
- notifications: 2.8.0
- oauth2: 1.8.0
- onlyoffice: 6.1.0
- password_policy: 1.10.1
- passwords: 2020.11.1
- photos: 1.2.0
- previewgenerator: 3.0.1
- privacy: 1.4.0
- provisioning_api: 1.10.0
- settings: 1.2.0
- sharebymail: 1.10.0
- survey_client: 1.8.0
- systemtags: 1.10.0
- tasks: 0.13.6
- text: 3.1.0
- theming: 1.11.0
- twofactor_backupcodes: 1.9.0
- updatenotification: 1.10.0
- user_status: 1.0.0
- viewer: 1.4.0
- weather_status: 1.0.0
- workflowengine: 2.2.0
Disabled:
- analytics
- checksum
- dashboard
- encryption
- files_external
- files_rightclick
- recommendations
- serverinfo
- support
- user_ldap
Nextcloud configuration:
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"dbtype": "pgsql",
"version": "20.0.1.1",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"mail_smtpmode": "smtp",
"forcessl": true,
"loglevel": 0,
"overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
"theme": "",
"maintenance": false,
"trusted_domains": [
"nc.1x-upon.com",
"nextcloud.lxd"
],
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"blacklisted_files": [],
"secret": "***REMOVED SENSITIVE VALUE***",
"preview_max_scale_factor": 1,
"enabledPreviewProviders": [
"OC\\Preview\\PNG",
"OC\\Preview\\JPEG",
"OC\\Preview\\GIF",
"OC\\Preview\\BMP",
"OC\\Preview\\XBitmap",
"OC\\Preview\\MP3",
"OC\\Preview\\TXT",
"OC\\Preview\\MarkDown",
"OC\\Preview\\Illustrator",
"OC\\Preview\\Movie",
"OC\\Preview\\MSOffice2003",
"OC\\Preview\\MSOffice2007",
"OC\\Preview\\MSOfficeDoc",
"OC\\Preview\\OpenDocument",
"OC\\Preview\\PDF",
"OC\\Preview\\Photoshop",
"OC\\Preview\\Postscript",
"OC\\Preview\\StarOffice",
"OC\\Preview\\SVG",
"OC\\Preview\\TIFF",
"OC\\Preview\\Font"
],
"memcache.local": "\\OC\\Memcache\\APCu",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379
},
"trashbin_retention_obligation": "auto",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"htaccess.RewriteBase": "\/",
"appstore.experimental.enabled": true,
"updater.release.channel": "stable",
"mail_smtpauthtype": "LOGIN",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "587",
"mail_smtpauth": 1,
"mail_smtpsecure": "tls",
"overwriteprotocol": "https",
"overwritehost": "***REMOVED SENSITIVE VALUE***",
"app_install_overwrite": [
"groupfolders"
],
"has_rebuilt_cache": true,
"datadirectory": "***REMOVED SENSITIVE VALUE***"
}
}
Logs
Browser log
[DEBUG] unified-search: Searching papier in
Object { 0: "settings_apps", 1: "calendar", 2: "notes", 3: "files", 4: "audioplayer", 5: "comments", 6: "deck", 7: "contacts", 8: "tasks", 9: "settings", … }
unified-search.js:1:271870
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the calendar search request and the unified-search.js browser log entry mentioned in the report, then trace how results from the local and subscribed calendars are combined. Reproduce the common-event search with dates from both calendars and verify that results are ordered from today onward.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, php
- Domain
- backend, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100