This repository is an example of the @globus/template-search-portal
You can create your own portal with similar functionality by following the Creating Your Own Research Search Portal section in the template repository and then referencing the sections below.
Globus Search is often used to provide metadata to datasets available via Globus Transfer. To support this use case, our serverless search portal includes the ability to enable Transfer-related features for users browsing your index.
- A Globus Search Index you administer.
- A Globus Collection that hosts data relevant to the documents in your Globus Search Index.
- A Search Portal, created following: Creating Your Own Research Search Portal in our template repository, with Authentication enabled.
The simplest way to enable Transfer functionality in your Search Portal is to add authentication to your portal1 and include Transfer properties in your search entries.
When a globus.transfer object is present on your GMetaResult.entries.content[n], and you've configured authentication, Transfer functionality will be automatically enabled2.
View a more comprehensive example of a GMetaEntry
{
"subject": "5352507d-1293-4827-8ba9-c2d4a0eb78d1",
"visible_to": [
"public"
],
"content": {
"name": "Atlanta International Airport Climate Data (ATL)",
"id": "5352507d-1293-4827-8ba9-c2d4a0eb78d1",
"path": "/portal/catalog/dataset_atl",
"region": "south",
"tags": [
"airport"
],
"globus": {
"transfer": {
"collection": "a6f165fa-aee2-4fe5-95f3-97429c28bf82",
"path": "/portal/catalog/dataset_atl",
"type": "directory"
}
}
}
}🧪 This feature is experimental, feel free to provide feedback if you encounter issues.
As an alternative to adding the globus.transfer property to entries JSONata can be used to allow dynamic references to existing properties.
- Enable JSONata support in your portal by setting
data.attributes.features.jsonatatotrue
"data": {
"attributes": {
"features": {
"jsonata": true
}
// ...
}
}- You'll customize the
Resultcomponent to include theglobus.transferconfiguration.
- A
propertymember can be used to signal JSONata should be used (against theGMetaResult) for sourcing. - For static values, a
stringcan be used.
"data": {
"attributes": {
"components": {
"Result": {
"globus": {
"transfer": {
// The `collection` property will be sourced from the `subject` on the `GMetaResult`.
"collection": {
"property": "$split($split(subject, 'globus://')[1], '/')[0]"
},
// The `path` will be sourced from the `subject`, similar to the `collection`.
"path": {
"property": "$replace(subject, 'globus://' & $split($split(subject, 'globus://')[1], '/')[0], '')"
},
// Setting the `type` to a static value.
"type": "directory"
}
}
}
}
// ...
}
}