From a9ce3ac3a4d20f108c300327b997e28538ecc337 Mon Sep 17 00:00:00 2001 From: Kristian Aurlien Date: Tue, 19 Jan 2021 20:57:18 +0100 Subject: [PATCH] Make session in searchSchema configurable --- src/index.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 099fae19..e2ff1b5a 100644 --- a/src/index.js +++ b/src/index.js @@ -341,8 +341,14 @@ export const assertSchema = ({ }); }; -export const searchSchema = async ({ driver, schema, debug = false }) => { - const session = driver.session(); +export const searchSchema = async ({ + driver, + schema, + debug = false, + sessionParams = {} +}) => { + const session = driver.session(sessionParams); + // drop all search indexes, given they cannot be updated via a second CALL to createNodeIndex const dropStatement = ` CALL db.indexes() YIELD name, provider WHERE provider = "fulltext-1.0"