Skip to content

Commit 28c4d63

Browse files
DOCSP-48763 - Fix createIndex() example (#1050) (#1051)
(cherry picked from commit cc1e175) Co-authored-by: Mike Woofter <[email protected]>
1 parent bb5c195 commit 28c4d63

File tree

1 file changed

+4
-2
lines changed
  • source/code-snippets/indexes

1 file changed

+4
-2
lines changed

source/code-snippets/indexes/text.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ async function run() {
1717
// Create a text index on the "title" and "body" fields
1818
const result = await myColl.createIndex(
1919
{ title: "text", body: "text" },
20-
{ default_language: "english" },
21-
{ weights: { body: 10, title: 3 } }
20+
{
21+
default_language: "english",
22+
weights: { body: 10, title: 3 }
23+
}
2224
);
2325
// end-idx
2426
console.log(`Index created: ${result}`);

0 commit comments

Comments
 (0)