Skip to content

Issue 6170 further improve search results order#6256

Merged
mahibi merged 3 commits into
masterfrom
issue-6170-furtherImproveSearchResultsOrder
May 29, 2026
Merged

Issue 6170 further improve search results order#6256
mahibi merged 3 commits into
masterfrom
issue-6170-furtherImproveSearchResultsOrder

Conversation

@mahibi
Copy link
Copy Markdown
Collaborator

@mahibi mahibi commented May 29, 2026

alternative approach to #6192 to resolve #6170

This is not 100% the server behavior, but i claim it's a bit better looking at the results.

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

@mahibi mahibi added this to the 24.1.0 milestone May 29, 2026
@mahibi mahibi requested a review from rapterjet2004 May 29, 2026 12:45
@mahibi mahibi self-assigned this May 29, 2026
@mahibi mahibi added the 3. to review Waiting for reviews label May 29, 2026
rapterjet2004 and others added 2 commits May 29, 2026 14:47
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
Replace the custom processOrderAndAdd helper and its pattern-based
predicates with plain forEach iteration, letting the server-returned
order stand. The previous implementation had variable shadowing,
an inconsistent regex for contacts (\s* instead of \b), and
duplicated the word-boundary pattern three times.

AI-assistant: Claude Code v2.1.142 (Claude Sonnet 4.6)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@mahibi mahibi force-pushed the issue-6170-furtherImproveSearchResultsOrder branch from d146880 to 4a9e7e7 Compare May 29, 2026 12:48
Introduce sortedByMatchQuality to rank results within each section:
exact title match first, then prefix (starts-with), then whole-word
(\b), then substring — with 1-on-1 conversations ranked above groups
within each tier and match position as a final tiebreaker.

AI-assistant: Claude Code v2.1.142 (Claude Sonnet 4.6)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@mahibi mahibi force-pushed the issue-6170-furtherImproveSearchResultsOrder branch from 4a9e7e7 to 83e7c86 Compare May 29, 2026 12:49
@github-actions
Copy link
Copy Markdown
Contributor

APK file: https://github.com/nextcloud/talk-android/actions/runs/26638185462/artifacts/7291180096
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@mahibi
Copy link
Copy Markdown
Collaborator Author

mahibi commented May 29, 2026

/backport to stable-24.0

@mahibi mahibi merged commit f0c9a14 into master May 29, 2026
14 of 18 checks passed
@mahibi mahibi deleted the issue-6170-furtherImproveSearchResultsOrder branch May 29, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unintuitive search results

2 participants