cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

How to make case-insensitive filtering using neo4j-graphql-js?

malik
Node Clone

I'm trying to implement an Apollo GraphQL query where I use filters to search for different sub-strings inside my type's fields. I want this filtering to be case-insensitive. How could I potentially achieve that?
I tried to implement it with Neo4j's built-in full-text search only to realise that filtering is then disabled and I need additional filtering to refine search results based on other non-text attributes of a type.

filter: {
          AND: [
            { imgUrl_not: null },
            {
              OR: [
                { title_contains: searchQuery },
                { summary_contains: searchQuery },
                { subtitle_contains: searchQuery },
                { description_contains: searchQuery },
              ],
            },
          ],
        },
4 REPLIES 4

iuviene
Node Link

Anyone have ideas about this? I have the same question about case insensitive filtering. Thanks.

malik
Node Clone

A little bump to see if there's any news regarding this.

jonathan
Node Clone

in my experience filtering doesn't work AT ALL.

clem
Graph Steward

I'm not familiar with Neo4J and JS so this suggestion might not be so useful..., but do you know about:

Call tolower() to the string expression that you're trying to match.

If you got a lot of nodes with the string property, consider creating a lowercase version of the strings you're searching on and add an index to the lower case version of the string.