Indices
OpenSearch index mapping and settings
To be used in the Create index API:
$ curl -d <index.json> -H 'Content-Type: application/json' -X PUT http://localhost:9200/<index-name>
Example entries
Examples of real-life crawled content are available for a file and a directory.
Reindexing
Stop crawler.
$ systemctl stop ipfs-crawler
Create snapshot to allow for rollback:
PUT
/_snapshot/ipfs/snapshot_v<old>
Create new index:
PUT /ipfs_v<new>
<<< index-json >>>
Reindex old to new:
POST /_reindex
{
"source": {
"index": "ipfs_v<old>"
},
"dest": {
"index": "ipfs_v<new>"
}
}
(Go fetch some coffee for this one.)
Remove old alias, create new alias:
POST /_aliases
{
"actions" : [
{ "remove" : { "index" : "ipfs_v<old>", "alias" : "ipfs" } },
{ "add" : { "index" : "ipfs_v<new>", "alias" : "ipfs" } }
]
}
Restart crawler:
$ systemctl start ipfs-crawler
Remove old index (after verifying everything is ok):
DELETE /ipv_v<old>