private SearchHits searchQueryRaw(String appid, String type, QueryBuilder query, Pager... pager) {
if (StringUtils.isBlank(appid)) {
return null;
}
Pager page = (pager != null && pager.length > 0) ? pager[0] : new Pager();
SortOrder order = page.isDesc() ? SortOrder.DESC : SortOrder.ASC;
SortBuilder sort = StringUtils.isBlank(page.getSortby()) ?
SortBuilders.scoreSort() : SortBuilders.fieldSort(page.getSortby()).order(order);
int max = page.getLimit();
int pageNum = (int) page.getPage();