Spring Data Aerospike repository query




I’ve integrated aerospike into a spring boot project. I’m trying to search for a string containing a value.

I’ve read this:

Also cloned this repo:

In my table ‘event’ i have a column ‘home’ which i have setup as my secondary index. My repos looks like this atm.

    public interface EventRepository extends AerospikeRepository<Event, UUID> {

    List<Event> findByHomeLike(String home);


However, i don’t want to use the ‘Like’ query because this only seems to match the start of the string. I’ve tried findByHomeContaining, findByHomeContains but seem to get a null pointer at Query.addCriteria. Specifically this.

CriteriaDefinition existing = this.criteria
		String key = criteriaDefinition.getKey();

Any help would be appreciated thanks.


LIKE seems being treated as StartingWith. Contains has not defined yet (return null) with the current version.

Thanks and will take a look into this.


Will Contains be implemented? If so will it take long?


Can you try to pull the last code from spring-data-aerospike and test with contains query?


Have you changed the pom.xml? The tests seem to fail because it can’t connect to an aerospike client, but this wasn’t the case before. I’ve got the latest code however and build the jar but seems to have broken my code. Spring can’t create some of my beans.

Parameter 0 of constructor in org.springframework.data.aerospike.repository.support.AerospikeRepositoryFactoryBean required a bean of type 'java.lang.Class' that could not be found.

^ Error showing


The pom file was not touched. I would double-check if the new jar has been included in the class path of the test code.


Working now thanks! But it doesn’t seem to take case sensitivity into account. So like:



Try another pull, it should have support for ContainingIgnoreCase now.


Working, thank you so much!