From 325226833206283d37081c86b3795d6636e4eb17 Mon Sep 17 00:00:00 2001 From: Mike Woofter <108414937+mongoKart@users.noreply.github.com> Date: Fri, 28 Mar 2025 12:32:19 -0500 Subject: [PATCH] DOCSP-48763 - Fix createIndex() example (#1050) (cherry picked from commit cc1e175a9c8bba33bda89a690355d775201600b3) --- source/code-snippets/indexes/text.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/code-snippets/indexes/text.js b/source/code-snippets/indexes/text.js index c2950e378..5c5c71599 100644 --- a/source/code-snippets/indexes/text.js +++ b/source/code-snippets/indexes/text.js @@ -17,8 +17,10 @@ async function run() { // Create a text index on the "title" and "body" fields const result = await myColl.createIndex( { title: "text", body: "text" }, - { default_language: "english" }, - { weights: { body: 10, title: 3 } } + { + default_language: "english", + weights: { body: 10, title: 3 } + } ); // end-idx console.log(`Index created: ${result}`);