Update 'Import minimal document and service overview into OpenSearch for filter functionality in HC 3.0'
62
Import-minimal-document-and-service-overview-into-OpenSearch-for-filter-functionality-in-HC-3.0.md
Normal file
62
Import-minimal-document-and-service-overview-into-OpenSearch-for-filter-functionality-in-HC-3.0.md
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
The following tool is used to create an index in OpenSearch with the content of the following data:
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
{
|
||||||
|
"services": [{
|
||||||
|
"service_title": "Anti DDoS",
|
||||||
|
"service_type": "antiddos",
|
||||||
|
"docs": [{
|
||||||
|
"title": "API Reference",
|
||||||
|
"type": "api-ref"
|
||||||
|
}, {
|
||||||
|
"title": "User Guide",
|
||||||
|
"type": "umn"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}, {
|
||||||
|
"service_title": "Application Operations Management",
|
||||||
|
"service_type": "aom",
|
||||||
|
"docs": [{
|
||||||
|
"title": "API Reference",
|
||||||
|
"type": "api-ref"
|
||||||
|
}, {
|
||||||
|
"title": "User Guide",
|
||||||
|
"type": "umn"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
....
|
||||||
|
],
|
||||||
|
"doc_types": [
|
||||||
|
"api-ref",
|
||||||
|
"umn",
|
||||||
|
"dev",
|
||||||
|
"image-creation-guide",
|
||||||
|
"tool-guide",
|
||||||
|
"mycredential",
|
||||||
|
"public-images",
|
||||||
|
"sdk-ref",
|
||||||
|
"operation-guide",
|
||||||
|
"operation-guide-lts",
|
||||||
|
"parallel-file-system",
|
||||||
|
"permissions-configuration-guide",
|
||||||
|
"swiftapi",
|
||||||
|
"s3api",
|
||||||
|
...
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
The data is then used to dynamically build the filter options for the search part of the Helpcenter website.
|
||||||
|
|
||||||
|
|
||||||
|
The tool which is used has the name `index_metadata` and can be found in the the tools folder.
|
||||||
|
|
||||||
|
The tool needs several env-args to run properly which can be seen with the following sample code.
|
||||||
|
|
||||||
|
Set the correct authentication variables.
|
||||||
|
|
||||||
|
```
|
||||||
|
python tools/index_metadata.py --hosts opensearch.eco.tsi-dev.otc-service.com:443 --target-environment public --index search_index_de --username <username> --password <password> --delete-index
|
||||||
|
```
|
@ -1,7 +0,0 @@
|
|||||||
To update the search index use the tool `index_metadata`.
|
|
||||||
|
|
||||||
Set the correct authentication variables.
|
|
||||||
|
|
||||||
```
|
|
||||||
python tools/index_metadata.py --hosts opensearch.eco.tsi-dev.otc-service.com:443 --target-environment public --index search_index_de --username <username> --password <password> --delete-index
|
|
||||||
```
|
|
Reference in New Issue
Block a user