cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a case insensitive full-text index with analyzer 'whitespace'

Stef-van-Stipdo
Node Link

Neo4j Version: 4.4.2
Edition: Enterprise

Currently I'm trying to implement a case-insensitive full-text index with the 'whitespace' analyzer.

CREATE FULLTEXT INDEX carIndex FOR (c:Car) ON EACH [c.ShortDescription, c.Name] OPTIONS { indexConfig: {`fulltext.analyzer`: 'whitespace'}}

When hitting this index it seems that it is case-sensitive.
Looking at the Full-text search index documentation I'm unable to find what I'm looking for.

Is there a way to create an index which is case insensitive and tokanizes on whitespace?

Other sources I've looked through:
Full-text index analyzer providers
Custom analyzer for fulltext search in Neo4j

1 ACCEPTED SOLUTION

Stef-van-Stipdo
Node Link

Seems like the default analyzer 'whitespace' doesn't make everything lowercase.
As a solution a custom analyzer has been created which tokanizes on whitespaces and is case-insensitive.

Analyzer

View solution in original post

2 REPLIES 2

Cobra
Ninja
Ninja

Hello @Stef-van-Stipdonk

Full-text search indexes are normally case-insensitive. Your query to create the index looks good. How did you test it?

Regards,
Cobra

Stef-van-Stipdo
Node Link

Seems like the default analyzer 'whitespace' doesn't make everything lowercase.
As a solution a custom analyzer has been created which tokanizes on whitespaces and is case-insensitive.

Analyzer

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

On November 16 and 17 for 24 hours across all timezones, you’ll learn about best practices for beginners and experts alike.