Case insensitive query for a user filter

I'm using neo4j-driver inside of a lambda function. I found the way to run a case insensitive query using regex by adding WHERE m.name =~ '(?i)neo'. This works when I'm not using a parameter. I've tried all of the ways in the following article, but haven't found the special combo that makes it work. Should I be using a where or should I be using =~ with .* and *.?

stackoverflow.com

2X_1_13010b109d4ec4b1279634b0cb28503093658577.jpeg

Running a case-insensitive cypher query

neo4j, case-insensitive, cypher

asked by gzg on 10:23AM - 18 Nov 12 UTC

FilteredUserList: (root, args, context) => {
      return new Promise((resolve, reject) => {
        let session = driver.session();
        let params = { cognitoId: args.cognitoId, textInput: args.textInput };
        let query = `
                MATCH (user:User)
                WHERE user.firstName CONTAINS $textInput OR user.lastName CONTAINS $textInput OR user.email CONTAINS $textInput
                RETURN user
                ;`;

That is the good way. but is there any chance it will use the Index while doing search . I guess regular expression does not use the index. May be slower when the volumn is high.