Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Make session in searchSchema configurable #577

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down