title: How to implement search dynamically with NativeSearchQueryBuilder()?
body: <p>if userId is null ,I want to remove .withQuery(QueryBuilders.matchQuery("createdBy",userId)) this condition, how can I implement search dynamically according to my passing parameters.</p>
  
  <pre><code> public &lt;T&gt; List&lt;T&gt; search(String index, String type, String tenantId ,String userId, String queryString, Class&lt;T&gt; clzz){
      log.debug("==========search==========");
      String allField = "_all";
      MultiMatchQueryBuilder multiMatchQueryBuilder = QueryBuilders.multiMatchQuery(queryString, allField);
  
      SearchQuery searchQuery = new NativeSearchQueryBuilder()
              .withIndices(index)
              .withTypes(type)
              .withQuery(multiMatchQueryBuilder)
              .withQuery(QueryBuilders.matchQuery("tenantId",tenantId))
              .withQuery(QueryBuilders.matchQuery("createdBy",userId))
              .build();
      List&lt;T&gt; list =
              operations.queryForPage(searchQuery,clzz).getContent();
      return list;
  }
  </code></pre>