code: public JSONArray searchByDSL(final String query, final int limit, final int offset) throws AtlasServiceException {
          LOG.debug("DSL query: {}", query);
          JSONObject result = callAPIWithRetries(API.SEARCH_DSL, null, new ResourceCreator() {
              @Override
              public WebResource createResource() {
                  WebResource resource = getResource(API.SEARCH_DSL);
                  resource = resource.queryParam(QUERY, query);
                  resource = resource.queryParam(LIMIT, String.valueOf(limit));
                  resource = resource.queryParam(OFFSET, String.valueOf(offset));
                  return resource;
              }
          });
          try {
              return result.getJSONArray(RESULTS);
          } catch (JSONException e) {
              throw new AtlasServiceException(e);
          }
      }
docs: Search given query DSL
  @param query DSL query
  @param limit number of rows to be returned in the result, used for pagination. maxlimit > limit > 0. -1 maps to atlas.search.defaultlimit property value
  @param offset offset to the results returned, used for pagination. offset >= 0. -1 maps to offset 0
  @return result json object
  @throws AtlasServiceException