Skip to content

Commit 2db5a0b

Browse files
Merge branch 'sprint-1.17' into remove/go
2 parents 27bc7d5 + f3eb60b commit 2db5a0b

File tree

1 file changed

+2
-2
lines changed
  • code/go/0chain.net/blobbercore/reference

1 file changed

+2
-2
lines changed

code/go/0chain.net/blobbercore/reference/ref.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ func GetReferenceByLookupHashForDownload(ctx context.Context, allocationID, path
283283
func GetReferencesByName(ctx context.Context, allocationID, name string) (refs []*Ref, err error) {
284284
db := datastore.GetStore().GetTransaction(ctx)
285285
err = db.Model(&Ref{}).
286-
Where("allocation_id = ? AND name @@ plainto_tsquery(?)", allocationID, name).
287-
Order("ts_rank_cd(to_tsvector('english', name), plainto_tsquery(?)) DESC").
286+
Where("allocation_id = ? AND name LIKE ?", allocationID, "%"+name+"%").
287+
Limit(20).
288288
Find(&refs).Error
289289
if err != nil {
290290
return nil, err

0 commit comments

Comments
 (0)