code: public JSONArray search(final String searchQuery, final int limit, final int offset) throws AtlasServiceException {
          JSONObject result = callAPIWithRetries(API.SEARCH, null, new ResourceCreator() {
              @Override
              public WebResource createResource() {
                  WebResource resource = getResource(API.SEARCH);
                  resource = resource.queryParam(QUERY, searchQuery);
                  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 using dsl/full text
  @param searchQuery
  @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 Query results
  @throws AtlasServiceException