markmcdowell / NLog.Targets.ElasticSearch

NLog target for Elasticsearch
MIT License
176 stars 89 forks source link

Setting fielddata = true #89

Closed aspdev closed 5 years ago

aspdev commented 5 years ago

I'm using Nlog to write logs to Elasticsearch, which works just fine. The problem is that aggregations don't work because the fielddata on the property I try to aggregate is set to false. The error I get reads as follows:

illegal_argument_exception Reason: \"Fielddata is disabled on text fields by default. Set fielddata=true on [level] in order to load fielddata in memory by uninverting the inverted index

As an index is created by Nlog I would like it to map certain properties in a way that they can be later aggregated upon search queries. Is it possible to configurte Nlog so that the error is gone and aggregations start working?

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.