Skip to content

Commit 526d75e

Browse files
committed
fix: make algolia chunks smaller
1 parent 3860e92 commit 526d75e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index-posts.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ async function main() {
2424
var splitString = cleanContent.split(" ");
2525
let numberOfChunks = 1;
2626
while (splitString.length) {
27-
const chunkedContent = splitString.splice(0, 1000).join(" ");
27+
const chunkedContent = splitString.splice(0, 500).join(" ");
2828

2929
objects.push({
30-
objectID: `/${uri}/:${numberOfChunks * 1000 - 1000}:${numberOfChunks * 1000}`,
30+
objectID: `/${uri}/:${numberOfChunks * 500 - 500}:${numberOfChunks * 500}`,
3131
title: data.title,
3232
author: data.author,
3333
tags: data.tags,

0 commit comments

Comments
 (0)