Skip to content

Commit 51b3d24

Browse files
authored
fix: hybridsearch should support offset param in restful api related (#43721)
related to #43556 , pr: #43586 Signed-off-by: xiaofanluan <xiaofan.luan@zilliz.com>
1 parent 305524f commit 51b3d24

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

internal/distributed/proxy/httpserver/handler_v2.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,6 +1288,7 @@ func (h *HandlersV2) advancedSearch(ctx context.Context, c *gin.Context, anyReq
12881288
{Key: proxy.RankTypeKey, Value: httpReq.Rerank.Strategy},
12891289
{Key: proxy.RankParamsKey, Value: string(bs)},
12901290
{Key: ParamLimit, Value: strconv.FormatInt(int64(httpReq.Limit), 10)},
1291+
{Key: proxy.OffsetKey, Value: strconv.FormatInt(int64(httpReq.Offset), 10)},
12911292
{Key: ParamRoundDecimal, Value: "-1"},
12921293
}
12931294
if httpReq.GroupByField != "" {

internal/distributed/proxy/httpserver/request_v2.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ type HybridSearchReq struct {
299299
Search []SubSearchReq `json:"search"`
300300
Rerank Rand `json:"rerank"`
301301
Limit int32 `json:"limit"`
302+
Offset int32 `json:"offset"`
302303
GroupByField string `json:"groupingField"`
303304
GroupSize int32 `json:"groupSize"`
304305
StrictGroupSize bool `json:"strictGroupSize"`

0 commit comments

Comments
 (0)