diff --git a/README.md b/README.md index 9e8f38ec1..497561be2 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,12 @@ Extending ElasticsearchRepository for custom methods ```java public interface BookRepository extends Repository { + //Equivalent Json Query will be "{ "bool" : { "must" :[{ "field" : {"name" : "?"} },{ "field" : {"price" : "?"} }]} }" + List; findByNameAndPrice(String name, Integer price); + + //Equivalent Json Query will be "{"bool" : {"should" : [ {"field" : "name" : "?"}}, {"field" : {"price" : "?"}} ]}}" + List findByNameOrPrice(String name, Integer price); + //Equivalent Json Query will be "{"bool" : {"must" : {"field" : {"name" : "?"}}}}" Page findByName(String name,Pageable page);