public function autocomplete() {
		Configure::write('debug', 0);
		if (!$this->_controller->request->is('ajax') || !$this->_controller->request->is('post') ||
			!$this->_controller->RequestHandler->prefers('json')) {
			throw new BadRequestException();
		}

		$data = [];
		$query = $this->_controller->request->data('query');
		$target = (array)$this->_controller->request->data('target');
		$limit = $this->_modelConfigSearchInfo->getAutocompleteLimit();
		$data = $this->_modelSearch->getAutocomplete($query, $target, $limit);

		$this->_controller->set(compact('data'));
		$this->_controller->set('_serialize', 'data');
	}