Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when indexing #157

Open
thesquaremedia opened this issue Dec 5, 2018 · 2 comments
Open

Error when indexing #157

thesquaremedia opened this issue Dec 5, 2018 · 2 comments

Comments

@thesquaremedia
Copy link

There was a problem indexing the data. (Content-Type header [application/x-www-form-urlencoded] is not supported) any idea of how to solve it?

@thesquaremedia
Copy link
Author

thesquaremedia commented Dec 5, 2018

updating this fixed that

static function _client($write = false)
	{
		$settings = array(
			'url' => Config::option('server_url'),
			"headers" => array("Content-Type" => "application/json")
		);

		if ($write) {
			$settings['timeout'] = Config::option('server_timeout_write') ?: 300;
		} else {
			$settings['timeout'] = Config::option('server_timeout_read') ?: 1;
		}

		// Allow custom settings to be passed by users who want to.
		$settings = apply_filters('indexer_client_settings', $settings);

		return new \Elastica\Client($settings);
	}

now I am getting this though There was a problem indexing the data. (failed to parse [post_date])

@thesquaremedia
Copy link
Author

so after trying to make it work. it seems the reason I get errors is becuase the plugin isnt compatible with the latest version of elastic search 6.x specially with the changes in multiple index types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant