Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the disadvantages of ElasticSearch Doc Values

The docs claims:

10–25% slower than in-memory fielddata

and

It is possible that doc values will become the default format in the near future

Besides this reduction in speed, what are the downsides of using doc values in all of the properties?

Thanks!

like image 552
Michael Avatar asked Sep 01 '15 13:09

Michael


People also ask

What is doc_ values?

doc_values edit Instead of looking up the term and finding documents, we need to be able to look up the document and find the terms that it has in a field. Doc values are the on-disk data structure, built at document index time, which makes this data access pattern possible.

How do I enable Fielddata in Elasticsearch?

“Fielddata is disabled on text fields by default. Set `fielddata=true` on [`your_field_name`] in order to load field data in memory by uninverting the inverted index.


1 Answers

The trend is to use doc_values whenever possible, as they are getting increasingly more performant than field data (especially since ES 1.4). One of the downsides for now is that you cannot use them with analyzed string fields and boolean fields. Another downside is if you're still using facets, resp. Kibana 3, as both are not leveraging doc values, but you can either migrate to aggregations, resp. upgrade to Kibana 4, so it's not really an issue.

Check out this excellent blog post by Chris Earle which explains the ins and outs of doc values vs fielddata.

like image 142
Val Avatar answered Oct 11 '22 12:10

Val