2014-12-09 224 views
0

我是Laravel的新手。在集成Laravel-Search時面臨一些問題。我按照下面的網站,有一些東西,但不完美。彈性搜索 - Laravel

Laravel_search

在寫了這樣的查詢..

$json = '{ 
     "query" : { 
      "match" : { 
       "name" : "apis" 
      } 
     } 
    }'; 

    $params['explain'] = $json; 

    return $results = Es::search($params); 

得到錯誤爲不可讀格式。通過上面發送的信息將會給出下面的錯誤。

錯誤:

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Whoops! There was an error.</title> <style>.cf:before, .cf:after {content: " ";display: table;} .cf:after {clear: both;} .cf {*zoom: 1;} body { font: 14px helvetica, arial, sans-serif; color: #2B2B2B; background-color: #D4D4D4; padding:0; margin: 0; max-height: 100%; } a { text-decoration: none; } .container{ height: 100%; width: 100%; position: fixed; margin: 0; padding: 0; left: 0; top: 0; } .branding { position: absolute; top: 10px; right: 20px; color: #777777; font-size: 10px; z-index: 100; } .branding a { color: #CD3F3F; } header { padding: 30px 20px; color: white; background: #272727; box-sizing: border-box; border-left: 5px solid #CD3F3F; } .exc-title { margin: 0; color: #616161; text-shadow: 0 1px 2px rgba(0, 0, 0, .1); } .exc-title-primary { color: #CD3F3F; } .exc-message { font-size: 32px; margin: 5px 0; word-wrap: break-word; } .stack-container { height: 100%; position: relative; } .details-container { height: 100%; overflow: auto; float: right; width: 70%; background: #DADADA; } .details { padding: 10px; padding-left: 5px; border-left: 5px solid rgba(0, 0, 0, .1); } .frames-container { height: 100%; overflow: auto; float: left; width: 30%; background: #FFF; } .frame { padding: 14px; background: #F3F3F3; border-right: 1px solid rgba(0, 0, 0, .2); cursor: pointer; } .frame.active { background-color: #4288CE; color: #F3F3F3; box-shadow: inset -2px 0 0 rgba(255, 255, 255, .1); text-shadow: 0 1px 0 rgba(0, 0, 0, .2); } .frame:not(.active):hover { background: #BEE9EA; } 

如何查詢瞭解這裏的表名。我應該在哪裏放置表名。幫我PLZ ..

+0

任何人的幫助,請。我應該在哪裏需要在上面的查詢中設置表名。 – robert 2014-12-09 13:52:04

回答