Skip to content

Commit 585ec09

Browse files
authored
Merge branch 'master' into feat/add-utc-flag-to-date-column
2 parents f803689 + d0b5454 commit 585ec09

2 files changed

Lines changed: 30 additions & 7 deletions

File tree

‎.github/workflows/docsearch.yml‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,35 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v5
15+
- name: Delete unaliased collections
16+
env:
17+
TYPESENSE_API_KEY: ${{ secrets.TYPESENSE_API_KEY }}
18+
TYPESENSE_HOST: ${{ secrets.TYPESENSE_HOST }}
19+
TYPESENSE_PROTOCOL: https
20+
TYPESENSE_PORT: 443
21+
run: |
22+
ALIAS_COLLECTION=$(curl -s -H "X-TYPESENSE-API-KEY: $TYPESENSE_API_KEY" \
23+
"$TYPESENSE_PROTOCOL://$TYPESENSE_HOST:$TYPESENSE_PORT/aliases/typeorm-docs" \
24+
| jq -r '.collection_name')
1525
26+
if [ "$ALIAS_COLLECTION" = "null" ] || [ -z "$ALIAS_COLLECTION" ]; then
27+
echo "Alias does not exist; skipping collection cleanup."
28+
exit 0
29+
fi
30+
31+
echo "Alias currently points to: $ALIAS_COLLECTION"
32+
33+
COLLECTIONS=$(curl -s -H "X-TYPESENSE-API-KEY: $TYPESENSE_API_KEY" \
34+
"$TYPESENSE_PROTOCOL://$TYPESENSE_HOST:$TYPESENSE_PORT/collections" \
35+
| jq -r '.[].name')
36+
37+
for col in $COLLECTIONS; do
38+
if [ "$col" != "$ALIAS_COLLECTION" ]; then
39+
echo "Deleting unaliased collection: $col"
40+
curl -s -X DELETE -H "X-TYPESENSE-API-KEY: $TYPESENSE_API_KEY" \
41+
"$TYPESENSE_PROTOCOL://$TYPESENSE_HOST:$TYPESENSE_PORT/collections/$col"
42+
fi
43+
done
1644
- run: |
1745
docker run \
1846
-e TYPESENSE_API_KEY=${{ secrets.TYPESENSE_API_KEY }} \

‎docs/docsearch-scraper-config.json‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,7 @@
2727
"strip_chars": " .,;:#",
2828
"custom_settings": {
2929
"separatorsToIndex": "_",
30-
"attributesForFaceting": [
31-
"language",
32-
"version",
33-
"type",
34-
"docusaurus_tag"
35-
],
30+
"attributesForFaceting": [],
3631
"attributesToRetrieve": [
3732
"hierarchy",
3833
"content",
@@ -46,4 +41,4 @@
4641
"833762294"
4742
],
4843
"nb_hits": 0
49-
}
44+
}

0 commit comments

Comments
 (0)