elasticsearch 조합 조회

3756 단어 elasticsearch
if (I("get.")) {
              if ($mac) $search['query']['filtered']['query']['bool']['must'][]['should']['mobile_mac'] = $mac;
              if ($ap_mac) $search['query']['filtered']['query']['bool']['must'][]['should']['collection_equipment_mac'] = $ap_mac;
              if ($placeCode) $search['query']['filtered']['query']['bool']['must'][]['should']['netbar_wacode'] = $placeCode;
              // unset($search['query']['match_all']);
       } else {
           $search['query']['match_all'] = array();
       }
       if (I('get.startDate')) $search['query']['filtered']['filter']['range']['last_update_time']['gte'] = strtotime(str_replace('+', ' ', I('get.startDate')));
           if (I('get.endDate')) $search['query']['filtered']['filter']['range']['last_update_time']['lte'] = strtotime(str_replace('+', ' ', I('get.endDate')));
           $re = $this->common->callInterfaceCommon($url, "GET", json_encode($search));

좋은 웹페이지 즐겨찾기