I am using spring-data-mongodb.
I want to use $or operator in my repository.
This is my query:
@Query("{'type':?0}")
List<Doc> findByType(String type, Pageable pageable);
How do use $or in @Query so as it can match either type or name and fetch me a document. Please help.
Per MongoDB reference for $or, your Query should be
you'll need to give pass type and name params.