fluent / fluentd-docs

This repository is deprecated. Go to fluentd-docs-gitbook repository.
49 stars 119 forks source link

out_elasticsearch docs don't explain type_name #512

Closed MartinVUALTO closed 6 years ago

MartinVUALTO commented 6 years ago

out_elasticsearch

The example:

<match my.logs>
  @type elasticsearch
  host localhost
  port 9200
  index_name fluentd
  type_name fluentd
</match>

but there is no explanation as to what type_name does.

Also

index_name (optional)
If you specify this option, fluent-plugin-elasticsearch will use fluentd style index.

an example of a "fluentd style index" similar to the logstash example would be nice.

cosmo0920 commented 6 years ago

This is because Elasticsearch 7.x will always use fixed _doc type_name. This parameter shouldn't change from default value for now. See for detail: https://www.elastic.co/guide/en/elasticsearch/reference/6.x/removal-of-types.html

fujimotos commented 6 years ago

@MartinVUALTO

but there is no explanation as to what type_name does.

This is actually an Elasticsearch question.

Elasticsearch once had a concept called "type" (or "mapping") which basically allows you to access a subset of an ES index efficiently. This feature was supposed to speed up search queries, without paying costs to create another ES index.

The following article contains a good summary of the feature:

https://www.elastic.co/blog/index-vs-type

Note that this feature is deprecated since Elasticsearch v7 for it was not really useful, so, unless you have a special interest in this feature, chances are that you don't need to care about it.

an example of a "fluentd style index" similar to the logstash example would be nice.

OK. I'll update the documentation.

fujimotos commented 6 years ago

OK. I'll update the documentation.

Done by #514. If you have anything unclear, please feel free to reopen this ticket.