Opened 5 years ago

Closed 5 years ago

#31386 closed New feature (duplicate)

Add support for the PostgresSQL ts_rank_cd function

Reported by: Hannes Ljungberg Owned by: Hannes Ljungberg
Component: contrib.postgres Version: dev
Severity: Normal Keywords: postgres search ts_rank_cd
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The ts_rank_cd function is used as an alternative to ts_rank for penalizing query words that are further apart from each other.

I'm thinking that adding a cover_density parameter to SearchRank should be enough. If this parameter is set to True the function will be switched to ts_rank_cd.

Change History (6)

comment:1 by Hannes Ljungberg, 5 years ago

Has patch: set

comment:2 by Simon Charette, 5 years ago

Triage Stage: UnreviewedReady for checkin

Patch LGTM pending two minor adjustments.

comment:3 by Claude Paroz, 5 years ago

Almost a duplicate of #28194. However, #28194 also suggests adding the normalization keyword parameter. Should we keep both tickets and address both issues separately?

comment:4 by Simon Charette, 5 years ago

I guess we could close this one as duplicate of #28194 and have https://github.com/django/django/pull/12597 address both.

Is it something you're interested in doing Hannes?

comment:5 by Hannes Ljungberg, 5 years ago

I don’t know how I missed that ticket. Sorry about that!

Sure, let’s close this ticket in favor of #28194. I’ll update my PR to add support for the normalization parameter.

comment:6 by Simon Charette, 5 years ago

Resolution: duplicate
Status: assignedclosed
Note: See TracTickets for help on using tickets.
Back to Top