mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-03-10 19:27:57 -04:00
Also store (and return) the Size in the index
This commit is contained in:
@@ -117,6 +117,7 @@ func fromFields(fields map[string]interface{}) (search.Match, error) {
|
||||
OpaqueId: IDParts[1],
|
||||
},
|
||||
Path: fields["Name"].(string),
|
||||
Size: uint64(fields["Size"].(float64)),
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ var _ = Describe("Index", func() {
|
||||
OpaqueId: "opaqueid",
|
||||
},
|
||||
Path: "foo.pdf",
|
||||
Size: 12345,
|
||||
}
|
||||
})
|
||||
|
||||
@@ -78,6 +79,7 @@ var _ = Describe("Index", func() {
|
||||
Expect(res.Matches[0].Reference.ResourceId).To(Equal(ref.ResourceId))
|
||||
Expect(res.Matches[0].Info.Id).To(Equal(ri.Id))
|
||||
Expect(res.Matches[0].Info.Path).To(Equal(ri.Path))
|
||||
Expect(res.Matches[0].Info.Size).To(Equal(ri.Size))
|
||||
})
|
||||
|
||||
PIt("finds files living deeper in the tree by prefix")
|
||||
|
||||
Reference in New Issue
Block a user