feat: 添加 Meilisearch 排名分数支持
This commit is contained in:
@@ -226,6 +226,8 @@ func (m *meilisearchDB) buildSearchRequest(ctx context.Context, searchParams *Se
|
|||||||
req.AttributesToRetrieve = searchParams.AttributesToRetrieve
|
req.AttributesToRetrieve = searchParams.AttributesToRetrieve
|
||||||
}
|
}
|
||||||
|
|
||||||
|
req.ShowRankingScore = searchParams.ShowRankingScore
|
||||||
|
|
||||||
return req, nil
|
return req, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ type SearchParams struct {
|
|||||||
AttributesToRetrieve []string // 返回字段
|
AttributesToRetrieve []string // 返回字段
|
||||||
Facets []string // 聚合字段
|
Facets []string // 聚合字段
|
||||||
HitsPerPage int // 每页命中数
|
HitsPerPage int // 每页命中数
|
||||||
|
ShowRankingScore bool // 是否显示排名分数
|
||||||
}
|
}
|
||||||
|
|
||||||
// SearchResult 搜索结果
|
// SearchResult 搜索结果
|
||||||
|
|||||||
Reference in New Issue
Block a user