I'd use the slug as the _id of the document so long as it is reasonably short. We already index _uid (type + id) as a string so you may as well use it.
Note that I'm asking what to store as a field in the mapping, not "_id". But something like "field_id" that I will later filter on (only on equality, no ranges).
And I'm telling you that you can get away with adding neither to your mapping and using the slug as the id.
I don't know off hand whether it'd be better to add a string or a number to the mapping. It is worth testing, I think. So long as you won't be aggregating or sorting on the field I'd turn off doc_values for it to save space.
... I'm saying that will have other documents on es that will have a field called "field_id" that I will use to filter on. That "thing_id" can be either string/long.
I wasn't asking about storing the original "thing" document on es.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.