@@ -37,6 +37,7 @@ class IndexTask(TypedDict):
3737 public : bool
3838 suggestion : list [str ]
3939 tags : list [str ]
40+ rank_modifier : float
4041 last_change : datetime | None
4142 publication_start : datetime | None
4243 publication_end : datetime | None
@@ -175,6 +176,7 @@ def index(
175176 '_public' : task ['public' ],
176177 '_access' : task .get ('access' , 'public' ),
177178 '_last_change' : task ['last_change' ],
179+ '_rank_modifier' : task ['rank_modifier' ],
178180 '_tags' : _tags ,
179181 '_suggestion' : task ['suggestion' ],
180182 '_publication_start' :
@@ -259,6 +261,7 @@ def index(
259261 SearchIndex .public : bindparam ('_public' ),
260262 SearchIndex .access : bindparam ('_access' ),
261263 SearchIndex .last_change : bindparam ('_last_change' ),
264+ SearchIndex .rank_modifier : bindparam ('_rank_modifier' ),
262265 SearchIndex ._tags :
263266 bindparam ('_tags' , type_ = ARRAY (Text )),
264267 SearchIndex .suggestion : bindparam ('_suggestion' ),
@@ -281,6 +284,7 @@ def index(
281284 'public' : stmt .excluded .public ,
282285 'access' : stmt .excluded .access ,
283286 'last_change' : stmt .excluded .last_change ,
287+ 'rank_modifier' : stmt .excluded .rank_modifier ,
284288 'tags' : stmt .excluded .tags ,
285289 'suggestion' : stmt .excluded .suggestion ,
286290 'title_vector' : stmt .excluded .title_vector ,
@@ -631,6 +635,7 @@ def index_task(
631635 'public' : obj .fts_public ,
632636 'suggestion' : [],
633637 'tags' : obj .fts_tags or [],
638+ 'rank_modifier' : obj .fts_rank_modifier ,
634639 'last_change' : obj .fts_last_change ,
635640 'publication_start' : obj .fts_publication_start ,
636641 'publication_end' : obj .fts_publication_end ,
0 commit comments