This commit is contained in:
Waylon Walker 2025-07-15 12:30:09 -05:00
commit a153bf1bb4
9 changed files with 1808 additions and 0 deletions

126
create-schema.sh Executable file
View file

@ -0,0 +1,126 @@
curl -X POST -H "Content-Type: application/json" --data '
{
"index": {
"name": "waylonwalker.com",
"search_fields": [
"title",
"body",
"tags",
"url"
],
"fields": {
"id": {
"type": "text",
"required": true,
"stored": true,
"indexed": false
},
"created_at": {
"type": "datetime",
"fast": true,
"stored": true,
"indexed": true
},
"title": {
"type": "text",
"stored": true
},
"body": {
"type": "text",
"stored": true
},
"active": {
"type": "bool",
"fast": true,
"stored": true
},
"rating": {
"type": "f64",
"stored": true,
"fast": true
},
"reviews": {
"type": "u64",
"stored": true,
"fast": true
},
"tags": {
"type": "text",
"stored": true,
"multi": true
},
"category": {
"type": "facet",
"stored": true
},
"formats": {
"type": "facet",
"stored": true,
"multi": true
},
"url": {
"type": "text",
"stored": true
}
},
"weight_multipliers": {
"title": 2,
"body": 0.7
}
}
}
' http://0.0.0.0:8000/index
curl -X POST -H "Content-Type: application/json" --data '
{
"index": {
"name": "thoughts-links",
"search_fields": [
"title",
"body",
"url"
],
"fields": {
"id": {
"type": "text",
"required": true,
"stored": true,
"indexed": false
},
"created_at": {
"type": "datetime",
"fast": true,
"stored": true,
"indexed": true
},
"title": {
"type": "text",
"stored": true
},
"body": {
"type": "text",
"stored": true
},
"description": {
"type": "text",
"stored": true
},
"image": {
"type": "text",
"stored": true
},
"url": {
"type": "text",
"stored": true
}
},
"weight_multipliers": {
"title": 2,
"body": 0.7,
"description": 0.7
}
}
}
' http://0.0.0.0:8000/index