1

I'm using Spring Boot with ElasticsearchRepository and RestHighLevelClient. I have this query in mt repository class:

public interface BillingCycleRepository extends ElasticsearchRepository<BillingCycle, String> {
    List<BillingCycle> findByUserIdOrderByStartDateDesc(String userId);
}

In my console, I can see this:

org.elasticsearch.client.RestClient      : request [POST http://localhost:9200/dev-billing-cycle/_doc/_search?rest_total_hits_as_int=true&typed_keys=true&ignore_unavailable=false&expand_wildcards=open&allow_no_indices=true&ignore_throttled=true&search_type=query_then_fetch&batched_reduce_size=512]

It generates a lot of parameters, like rest_total_hits_as_int and `typed_keys.

Is it possible to configure these parameters and add any others, like "filter_path", "preference"?

double-beep
  • 5,031
  • 17
  • 33
  • 41
  • these request are created by Elasticsearch's RestHighLevelClient. So for what requests are these parameters that you need? I can't find _filter_path_ in the Elasticsearch documentation – P.J.Meisch May 23 '20 at 08:06
  • I'd like to do the same request that I did with my local elasticsearch: http://localhost:9200/dev-billing-cycle/_doc/_search?preference=xyzabc123&filter_path= hits.hits._id,hits.hits._source But using my spring query above. – Alessandra Mansano May 25 '20 at 03:34

0 Answers0