Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
03-04-2020 02:46 AM
We'd like to use case insensitivity searches in our project with the help of Neo4JRepositories, but we don't have the option to do so. The feature should be in SDN since version 5.2.0.M2 (2019-03-07). We're using version 5.2.5.RELEASE as of now.
We'd like to use it like this:
@Repository
interface LocationsRepository extends Neo4jRepository<Location, String> {
List<Location> findByNameIgnoreCase(String location);
}
but are currently using a workaround with regex.
03-04-2020 04:25 AM
I just ensured with exactly this version that it generates the right query like
MATCH (n:Location) WHERE toLower(n.name) = toLower($location) RETURN ...
Could you turn debug logging on for org.neo4j.ogm
and look what query do you get generated when executing the method above?
03-04-2020 04:53 AM
It works! But it seems like IntelliJ has no auto-completion for the IgnoreCase in findBy..IgnoreCase.
Another question. Is it possible to make a query with startsWith?
findByNameIsStartingWithIgnoreCase(String string) doesn't seem to work.
Unable to ignore case of java.lang.String types, the property 'name' must reference a String
03-06-2020 02:30 AM
This is not yet supported but we think it should.
There is now a ticket that is also kind of already solved but we also need to release new service versions of Neo4j-OGM 3.1 and 3.2 to make this work throughout the stack.
All the sessions of the conference are now available online