Ejemplo n.º 1
0
	/**
	 * Makes calls to the elasticsearch server based on this index
	 *
	 * It's possible to make any REST query directly over this method
	 *
	 * @param string $path Path to call
	 * @param string $method Rest method to use (GET, POST, DELETE, PUT)
	 * @param array $data OPTIONAL Arguments as array
	 * @param array $query OPTIONAL Query params
	 * @return Elastica_Response Response object
	 */
	public function request($path, $method, $data = array(), array $query = array()) {
		$request = new Elastica_Request($this, $path, $method, $data, $query);
		return $request->send();
	}