0

I am trying to conserve doc count in Bonsai's Elasticsearch cluster. They've said that when I use nested fields, each nested field counts as an additional document. Is there a way to index my data to have nested fields (like multiple entries for authors or comments on a document) such that I can put all the individual authors into one document?

See article here: https://docs.bonsai.io/article/337-reducing-document-usage

Thank you!

1 Answers1

0

What the article suggests towards the end is the best suggestion i.e., to decide upon the fields that need to be indexed as they would be used within searches. Optimizing the mapping would be the only approach since non-normalized data would also result in equal number of documents compared to a single doc with nested fields.

Srikanta
  • 1,145
  • 2
  • 12
  • 22
  • Thanks for letting me know, do you know if there are ways to update the mapping so that a list of things counts as just one document in elastic? – Vincent Stevenson Sep 20 '20 at 03:27
  • @VincentStevenson No, AFAIK there is no way a mapping can help us here. JSON Array as a datastructre is considered as multiple docs. – Srikanta Sep 20 '20 at 14:49