nextcloud / nextcloud/fulltextsearch

Fulltextsearch Fails with Usernames and Group Names Containing Special Characters

Open
#768 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
234
Forks
64
Avg merge
6h 18m
Merged PRs (30d)
10

Description

Issue Title: Fulltextsearch Fails with Usernames and Group Names Containing Special Characters

Description:

When using the Fulltextsearch feature in Nextcloud, I've consistently observed that the search doesn't operate correctly for usernames and group names containing special characters, spaces, or specific combinations of letters and numbers. Specifically:

Usernames and groups like "test", "test3", "testgroup" and , "test3group" operate as expected.
Usernames and group names such as "test 3", "Test_3", "Test@3", "test group" do not function properly.

This issue has been consistently reproducible over the past 2 weeks.

Steps to Reproduce:

Set up a new Nextcloud instance.
Install and configure the Fulltextsearch plugin.
Create users and groups with varying name patterns:
    test, test3, testgroup, test3group: functions as expected
    test 3,  Test_3, Test@3, "test group": search doesn't work

Execute a full-text search for each user and group.

Expected Result:

The Fulltextsearch should function consistently, irrespective of the username or group name's structure or content.

Actual Result:

Fulltextsearch operates only for usernames and group names that are simple strings made up of letters and numbers. It fails when the name includes special characters or spaces etc.

Environment:

Nextcloud version: 27.0.2.1
elasticsearch version: 8.8.1
Full text search version 27.0.1
Full text search - Elasticsearch Platform version: 27.0.2
Full text search - Files version: 27.0.1
Full text search - Files - Tesseract OCR version: 27.0.0
Database: Postgres 15

Additional Notes:

The user experience of Fulltextsearch could see significant improvement if this issue is addressed. Many users and groups tend to have names with spaces and special characters. As a result, there's a prevalent misconception that Fulltextsearch operates exclusively for admin users or admin groups, which is not the case.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in a fresh Nextcloud 27.0.2.1 instance with the Full text search and Elasticsearch Platform apps, using Elasticsearch 8.8.1. Compare searches for simple names against names containing spaces, underscores, or @; done means all listed username and group-name patterns return consistent results.

Written by the indexing model from the issue text.

Assessment

Tech stack
elasticsearch, php, postgresql
Domain
backend, search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.