Skip to content

Instantly share code, notes, and snippets.

@henesgokdag
Created January 1, 2022 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henesgokdag/6a7d7438f47bdf5c31c6907577481eeb to your computer and use it in GitHub Desktop.
Save henesgokdag/6a7d7438f47bdf5c31c6907577481eeb to your computer and use it in GitHub Desktop.
@Repository
public interface ProductRepository extends ElasticsearchRepository<Product,String> {
@Query("{\"bool\": {\"must\": [{\"match\": {\"name\": \"?0\"}}]}}")
List<Product> findByName(String name);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment