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.

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.

Diff Detail

Repository
rP Phabricator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Jul 18 2019, 5:22 PM
epriestley requested review of this revision.Jul 18 2019, 5:23 PM
amckinley accepted this revision.Jul 18 2019, 5:27 PM
This revision is now accepted and ready to land.Jul 18 2019, 5:27 PM