Closed
Description
hi,
it would be nice to have support for named parameters in @Query
queries, similarly to e.g. spring-data-jpa:
@Query("{\"match\": {\"name\": {\"query\": \":name\"}}}")
Page<Book> findByName(String name,Pageable pageable);
instead of
@Query("{\"match\": {\"name\": {\"query\": \"?0\"}}}")
Page<Book> findByName(String name,Pageable pageable);
looking for patterns with :
would be tricky because of the ES query syntax so we could make that behavior explicit instead; let the user define if a query is using positional or named parameters with a new flag.
created a WIP here: diamondT@cd3d2cc
if this is something worth pursuing i can polish a bit more and send a PR.
thanks,