Open mindisk opened 1 year ago
Adding documentType="" to target xsi:type="ElasticSearch" solved the issue.
<target xsi:type="ElasticSearch" index="${elasticSearchIndex}" uri="${elasticSearchUri}" username="${elasticSearchUsername}" password="${elasticSearchPassword}" documentType="">
It now works with ES 8.
The Versions table on the project front page makes you wonder if ES 8 is supported. I think you should highlight that this project supports ES 8, and mention the empty documentType requirement.
Looks like data streams are not supported though:
2024-07-30 15:59:27.6445 Error ElasticSearch: Bulk item failed: index:my-stream result: type: error:Type: illegal_argument_exception Reason: "only write ops with an op_type of create are allowed in data streams" CausedBy: "Type: index_not_found_exception Reason: "no such index [my-stream]""
It's true that the my-stream
index does not exist since it's actually a data stream
@johnjaylward The Wiki mentions that you can assign opCodeCreate="true"
to enable data-streams. See also #132
will settings opCodeCreate="true"
still work for a regular index as well, or only data streams?
No idea. Maybe look in the ElasticSearch-manual or ask ElasticSearch-support or use StackOverflow.com or Google how opCode
is working.
I have updated NLog and NLog.Targets.ElasticSearch to latest versions and it worked against Elasticsearch 7. I have upgraded Elasticsearch to version 8. After that, I was unable to write logs to Elasticsearch.
After looking at NLog.Targets.ElasticSearch repository, I noticed that Elasticsearch 8 is not mentioned anywhere and that the latest package targets Elasticserach 7 and not 8.
Is it true that NLog.Targets.ElasticSearch does not support Elasticsearch 8 at the moment? If it is true, when I could expect support for Elasticsearch 8 to be available?