bangumi / bangumi/server

[Feature Request]: 为条目搜索增加基于评分数的过滤条件

Open
#818 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
679
Forks
77
Avg merge
12m
Merged PRs (30d)
7

Description

**你想添加的新功能**
对于条目搜索 **/v0/search/subjects** ,希望增加一个基于评分数(对应响应中的**rating.total**)的过滤条件。
有时候,即使我将rating参数的范围设置得非常小,在一些包含整数评分的区间仍然会出现total的值为1000,即匹配的条目过多的情况。而这里面有很多都是没几个votes的冷门条目,如果能将这部分忽略掉,不仅能解决上述问题,还能减少总体的搜索次数。
**你希望的解决方案**
添加基于评分数的过滤参数,可以拆分成两个参数分别代表最大值和最小值,也可以是传一个区间的形式,或者像rating一样传字符串列表。

Contributor guide

Open the contributing guide

Research direction

Start by reading the implementation and existing tests for the /v0/search/subjects endpoint. Define how the new filter parameter should represent rating.total bounds, then verify that searches exclude entries outside those bounds while preserving existing rating filtering behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.