Hello Alexandre,
The important difference when offering a search over a Collection, rather than a Manifest, is that the canvases targeted in the results are not part of the Collection resource the search service was provided for.
If a client such as Universal Viewer or Mirador loads a manifest with a search service, it already has all the canvases that the results point to.
A client interacting with a search over a Collection needs an extra piece of information to generate a useful experience for the user - the URL of the manifest that each search result's canvas lives in. This can be provided via the within property.
Example of a normal search result, returned by a content search service that belongs to a manifest:
{
"@type": "oa:Annotation",
"motivation": "sc:painting",
"resource": {
"@type": "cnt:ContentAsText",
"chars": "A bird in the hand is worth two in the bush"
},
}
Example of a search result that also provides the manifest:
{
"@type": "oa:Annotation",
"motivation": "sc:painting",
"resource": {
"@type": "cnt:ContentAsText",
"chars": "A bird in the hand is worth two in the bush"
},
"on": {
"@type": "sc:Canvas",
"within": {
"@type": "sc:Manifest",
"label": "A label would be useful, too"
}
}
This allows results from different manifests to be returned in the same set of results; the client can follow the manifest links if it wants to, and find the canvases referred to.
This extra information would be essential in a discovery environment, searching across a collection. Thumbnails would be useful, too.
Tom