+ /**
+ * Insert the given terms into the database.
+ * Chunks through the given terms to remain within database limits.
+ * @param array[] $terms
+ */
+ protected function insertTerms(array $terms): void
+ {
+ $chunkedTerms = array_chunk($terms, 500);
+ foreach ($chunkedTerms as $termChunk) {
+ SearchTerm::query()->insert($termChunk);
+ }
+ }
+