Using Elastic Search With ElasticsearchClient

Hi, Iam migrating from RestHighLevelClient to ElasticsearchClient and as part of this change i need to replace NativeSearchQuery and NativeSearchQueryBuilder with NativeQuery and NativeQueryBuilder
But iam not able to pass the boolQueryBuilder to the existing withQuery API ,
Can you please advise the right solution for this

Below is the pseudocode
Before Migrating:

BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
 boolQueryBuilder.must(new TermsQueryBuilder(fieldName+".keyword", flVal));
NativeSearchQueryBuilder searchQueryBuilder = new NativeSearchQueryBuilder();	
searchQueryBuilder.withQuery(boolQueryBuilder); 
NativeSearchQuery queryn = searchQueryBuilder.build();
elasticsearchTemplate = new ElasticsearchTemplate(elasticsearchClient);
hits = elasticsearchTemplate.search(queryn, getMappedEntityClass(), IndexCoordinates.of(getIndexName()));

After Migrating:

BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
 boolQueryBuilder.must(new TermsQueryBuilder(fieldName+".keyword", flVal));
NativeQueryBuilder searchQueryBuilder = new NativeQueryBuilder();	
searchQueryBuilder.withQuery(boolQueryBuilder); // 

The above last line throws compilation exception,
Can you please suggest the alternative for this so that the above current working logic works with NativeQueryBuilder and NativeQuery

Thanks,

Are you speaking about Spring Elasticsearch data classes?

Yes iam referring to the latest version of spring-data-elasticsearch and all other latest version of Elasticsearch where NativeSearchQuery and NativeQueryBuilder are being deprecated and iam forced to use NativeQuery and NativeQueryBuilder replacing HighLevelClient with ElasticsearchClient

So may be you should ask on the spring data forums?

Okay...Thanks..