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

Elastica\Client\updateDocument fails with ES 7.3 #1683

Closed
lenada opened this issue Oct 24, 2019 · 12 comments
Closed

Elastica\Client\updateDocument fails with ES 7.3 #1683

lenada opened this issue Oct 24, 2019 · 12 comments

Comments

@lenada
Copy link

lenada commented Oct 24, 2019

When testing current master against Elasticsearch 7.3
->updateDocument() throws

Elasticsearch\Common\Exceptions\UnexpectedValueException

"version" is not a valid parameter. Allowed parameters are "_source", "_source_excludes", "_source_includes", "error_trace", "filter_path", "human", "if_primary_term", "if_seq_no", "lang", "opaqueId", "parent", "pretty", "refresh", "retry_on_conflict", "routing", "source", "timeout", "wait_for_active_shards"

After removing the version parameter it seems to update the document just fine.

Apart from that issue; are there plans to tag a ES 7.3 compatible release anytime soon?

@ruflin
Copy link
Owner

ruflin commented Oct 28, 2019

@lenada Thanks for filing. There are definitively plans for a 7.x release but we are currently blocked a bit on #1666

Did you dig into more details by chance on what changed in 7.3 Elasticsearch that causes the above (like a changelog)?

@lenada
Copy link
Author

lenada commented Oct 28, 2019

It seems the version parameter was deprecated in ES 7.0.0
Remove support for internal versioning for concurrency control
(See CRUD paragraph)

related issue: elastic/elasticsearch#38254

@philkra
Copy link

philkra commented Oct 28, 2019

I tested ->updateDocument() with the branch es-7-remove-type from PR #1666 and reproduced the error.

@lenada
Copy link
Author

lenada commented Feb 2, 2020

@ruflin @thePanz I recently tested Release 7.0.0-beta.3 unfortunately ist seems the version parameter is still present there and errors with ES >= 7.0

@ruflin
Copy link
Owner

ruflin commented Feb 11, 2020

@lenada Did you figure out by chance where in the code this is coming from?

@thePanz
Copy link
Collaborator

thePanz commented Feb 11, 2020

@lenada @philkra can you provide an example code where the exception is being thrown?

@lenada
Copy link
Author

lenada commented Feb 11, 2020

@ruflin @thePanz thank you for your time! When I comment https://github.com/ruflin/Elastica/blob/master/lib/Elastica/Client.php#L365 no exception is thrown.
I wonder why this error does not occur on any travis builds?

@ruflin
Copy link
Owner

ruflin commented Feb 11, 2020

Makes me wonder if we have a test case for updateDocument :-)

@armandojs
Copy link

I can confirm this on my end as well. I'm using "ruflin/elastica": "7.0.0-beta.3"

Retrieving a document brings the 'version' parameter with it and saving the document back by running updateDocument produces the error.

I can work around this by removing the 'version' parameter from the params array though not sure if it's a good idea. My Elasticsearch/Elastica knowledge is very superficial.

@consolari
Copy link

Reproduced this on elaticsearch 7.9.1 and elatica dev-master. Everything else seems to work fine. Any chance it can be prioritized up?

When uncommented 'version' in params in Client.php->updateDocument() it works.

@ruflin
Copy link
Owner

ruflin commented Sep 16, 2020

@consolari Any chance you could open a PR with this change against master? This should simplify the dicsussion and we will also see what tests this effects.

@deguif
Copy link
Collaborator

deguif commented Dec 7, 2021

Closed as it was fixed in #1803

@deguif deguif closed this as completed Dec 7, 2021
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

7 participants