src/snac/client/webui/WebUIExecutor.php
/**
     * Perform Name Search
     *
     * Perform a name search on the terms given on the input by requesting the results from the server and
     * then returns the JSON-ready associative array of results.
     *
     * @param string[] $input Post/Get inputs from the webui
     * @param boolean $autocomplete optional Whether to do a search using autocomplete or not (default false)
     * @return string[] The web ui's response to the client (array ready for json_encode)
     */
Perform Name Search
Perform a name search on the terms given on the input by requesting the results from the server and
then returns the JSON-ready associative array of results.

@param string[] $input Post/Get inputs from the webui
@param boolean $autocomplete optional Whether to do a search using autocomplete or not (default false)
@return string[] The web ui's response to the client (array ready for json_encode)
Perform Name Search Perform a name search on the terms given on the input by requesting the results from the server and then returns the JSON - ready associative array of results . @param string [] $input Post / Get inputs from the webui @param boolean $autocomplete optional Whether to do a search using autocomplete or not ( default false ) @return string [] The web ui ' s response to the client ( array ready for json_encode )
public function performNameSearch(&$input, $autocomplete=false) {
        if (!isset($input["term"])) {
            return array ("total" => 0, "results" => array());
        }
        if (!isset($input["entity_type"]))
            $input["entity_type"] = "";
        $query = array(
            "command" => "search",
            "term" => $input["term"],
            "entity_type" => $input["entity_type"],
            "start" => isset($input["start"]) ? $input["start"] : 0,
            "count" => isset($input["count"]) ? $input["count"] : 10
        );
        if (isset($input["facets"])) {
            $query["facets"] = $input["facets"];
        }
        if (isset($input["biog_hist"])) {
            $query["biog_hist"] = $input["biog_hist"];
        }
        if ($autocomplete) {
            $query["search_type"] = "autocomplete";
        } else if (isset($input["search_type"]) && $input["search_type"] === "advanced") {
            $query["search_type"] = "advanced";
        }
        $serverResponse = $this->connect->query($query);
        return $serverResponse;
    }
public function performNameSearch ( & $ input , $ autocomplete = false ) { if ( ! isset ( $ input [ " term " ] ) ) { return array ( " total " => 0 , " results " => array ( ) ) ; } if ( ! isset ( $ input [ " entity_type " ] ) ) $ input [ " entity_type " ] = " " ; $ query = array ( " command " => " search " , " term " => $ input [ " term " ] , " entity_type " => $ input [ " entity_type " ] , " start " => isset ( $ input [ " start " ] ) ? $ input [ " start " ] : 0 , " count " => isset ( $ input [ " count " ] ) ? $ input [ " count " ] : 10 ) ; if ( isset ( $ input [ " facets " ] ) ) { $ query [ " facets " ] = $ input [ " facets " ] ; } if ( isset ( $ input [ " biog_hist " ] ) ) { $ query [ " biog_hist " ] = $ input [ " biog_hist " ] ; } if ( $ autocomplete ) { $ query [ " search_type " ] = " autocomplete " ; } else if ( isset ( $ input [ " search_type " ] ) && $ input [ " search_type " ] === " advanced " ) { $ query [ " search_type " ] = " advanced " ; } $ serverResponse = $ this -> connect -> query ( $ query ) ; return $ serverResponse ; }
Perform Name Search
 Perform a name search on the terms given on the input by requesting the results from the server and
 then returns the JSON-ready associative array of results.
Perform Name Search Perform a name search on the terms given on the input by requesting the results from the server and then returns the JSON - ready associative array of results .
// Query the server for the elastic search results