}
public List<Identity> search(Identity identity,
ProfileFilter filter,
Type type,
long offset,
<BUG>long limit) {
String esQuery = buildQueryStatement(identity, filter, type, offset, limit);</BUG>
String jsonResponse = this.client.sendRequest(esQuery, this.index, this.searchType);
return buildResult(jsonResponse);
}

}
public List<Identity> search(Identity identity,
ProfileFilter filter,
Type type,
long offset,
long limit) {
if(identity == null && filter.getViewerIdentity() != null) {
identity = filter.getViewerIdentity();
}
String esQuery = buildQueryStatement(identity, filter, type, offset, limit);
String jsonResponse = this.client.sendRequest(esQuery, this.index, this.searchType);
return buildResult(jsonResponse);
}
