Page MenuHomePhabricator

In Ferret, allow documents with no title to match query terms by using LEFT JOIN on the "title" ranking field
ClosedPublic

Authored by epriestley on Jul 18 2019, 5:22 PM.
Tags
None
Referenced Files
F19510988: D20660.diff
Sun, Jan 11, 7:19 PM
F19502501: D20660.diff
Thu, Jan 8, 4:46 PM
F19472540: D20660.diff
Wed, Jan 7, 9:15 AM
F19014722: D20660.diff
Nov 22 2025, 9:27 PM
F18867948: D20660.id.diff
Nov 4 2025, 3:44 AM
F18803981: D20660.id49286.diff
Oct 18 2025, 5:15 AM
F18702596: D20660.diff
Sep 28 2025, 12:42 AM
F18702589: D20660.diff
Sep 28 2025, 12:41 AM
Subscribers
None

Details

Summary

Fixes T13345. See D20650. Currently, PhabricatorCursorPagedPolicyAwareQuery does a JOIN against the "title" field so it can apply additional ranking/ordering conditions to the query.

This means that documents with no title (which don't have this field) are always excluded from the result set.

We'd prefer to include them, just not give them any bonus ranking/relevance boost. Use a LEFT JOIN so they get included.

Test Plan
  • Applied D20650 (diff 1), made it use raw getTitle() as the document title, indexed a paste with no title.
  • Searched for a term in the paste body.
  • Before change: no results.
  • After change: found result.

Screen Shot 2019-07-18 at 10.18.32 AM.png (664×1 px, 85 KB)

Diff Detail

Repository
rP Phabricator
Branch
query1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 23151
Build 31793: Run Core Tests
Build 31792: arc lint + arc unit