RocketChat / RocketChat/Rocket.Chat

Global Search giving no results for some regex search strings

Open
#12,819 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

If I do a global message search for a particular regex string, no results are returned. If I search for a similar but longer string, results are returned that should match the shorter expression.

Steps to reproduce:
  1. Make sure you have at least one message containing the string "Remote server failed".
  2. Enable Global Search (Admin/Settings/Search/Default Provider - tick True next to Global Search).
  3. In any channel, click on the search icon, make sure Global Search is ticked.
  4. Type /remote server/i in the search box. For me, no results are returned.
  5. Type /remote server failed/i in the search box, and results are returned.
Expected behavior:

Step 3 should return the same results as step 4, and possibly more.

Actual behavior:

Step 3 returns no results. It returns results if I untick Global Search and I'm in the right channel, so I suspect the problem is with Global Search.

We're still running 0.66.2, so would appreciate if someone can verify the behaviour in the latest version, assuming anyone can verify it at all.

Server Setup Information:
  • Version of Rocket.Chat Server: 0.66.2

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 Global Search behavior from Admin/Settings/Search and the channel search icon, using /remote server/i and /remote server failed/i against a message containing "Remote server failed". Verify the behavior on a current version, then trace the Global Search path and its regex handling; done means the shorter expression returns the expected matching results.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.