Using @Version gives error - version_type parameter value must be lowercase
See original GitHub issueElasticsearch expects version_type
parameter value to be lowercase (case-sensitive), i.e. it should be “external”, not EXTERNAL. Gives error with ES 2.3 (and 2.4). Tested with AWS ES service and standalone.
Given:
@Document(indexName = "version-test")
public class MyDoc {
...
@Version
private Long version = 0L;
}
When: saving to index (using an ElasticsearchRepository)
Then:
2016-09-16 03:45:18.451 ERROR 68586 --- [ main] c.g.v.s.jest.JestElasticsearchTemplate : Cannot execute jest action , response code : 400 , error : {"root_cause":[{"type":"illegal_argument_exception","reason":"No version type match [EXTERNAL]"}],"type":"illegal_argument_exception","reason":"No version type match [EXTERNAL]"} , message : null
2016-09-16 03:45:18.485 ERROR 68586 --- [ main] o.s.d.r.w.RepositoryRestExceptionHandler : Query can not be null.
Suggestion: see JestElasticsearchTemplate.java Line 1165 - convert to lowercase string (or use ordinal).
if (query.getVersion() != null) {
indexBuilder.setParameter(Parameters.VERSION, query.getVersion());
indexBuilder.setParameter(Parameters.VERSION_TYPE, EXTERNAL);
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Docker error: invalid reference format: repository name must ...
The problem here is that it is lower case, I'm not using any upper case letters anywhere in the image name and it's...
Read more >When building in version 3.2.1 "repository name must be ...
Hi, since Docker for Desktop on Mac Version 3.2.1 the build fails with: ... it means is that docker repository names must be...
Read more >Bash Reference Manual - GNU.org
The expansion is a string that is the value of parameter with lowercase alphabetic characters converted to uppercase.
Read more >Groovy Language Documentation
This extra lenience allows using method or variable names that were not keywords in earlier versions of Groovy or are not keywords in...
Read more >XSL Transformations (XSLT) Version 2.0 (Second Edition)
Please report errors in and submit comments on this document using ... the processor must signal the error, and the transformation fails.].
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, the current master works on my env now with Spring Boot 1.4 + ES 2.4 (embedded). Thank you!
Thanks @VanRoy I think I missed your upgrade. I will test my system now. If it works.
Thanks Ruchi