# How to structure posts with comments for a blog?

**URL:** https://discuss.elastic.co/t/how-to-structure-posts-with-comments-for-a-blog/22116
**Category:** Elasticsearch
**Created:** [February 11, 2015, 9:42pm UTC](https://discuss.elastic.co/t/how-to-structure-posts-with-comments-for-a-blog/22116 "2015-02-11T21:42:15Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Andrew\_Axelrod](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_axelrod/32/921_2.png) [@Andrew\_Axelrod](https://discuss.elastic.co/u/Andrew_Axelrod)
#### Post date: [February 11, 2015, 9:42pm UTC](https://discuss.elastic.co/t/how-to-structure-posts-with-comments-for-a-blog/22116/1 "2015-02-11T21:42:15Z")

</div>

What's the best way to structure a post/comment system using elasticsearch?  
I'm using elasticsearch as a secondary database.

There would be a post with a multithreaded commenting system, maybe two  
levels deep.  
Each post can have up to 500-1000 comments.  
There will be incremental counters for both likes and comments for each  
comment and post. This means a lot of indexing.

Is it better to go with nested objects OR parent/child OR something else?  
Any advice on structure and how often to update elastricsearch would be  
most appreaciated.

Thanks,

Andrew

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/5a294b9d-aed8-454c-aca8-958a225049b9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5a294b9d-aed8-454c-aca8-958a225049b9%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 12:33am UTC](https://discuss.elastic.co/t/how-to-structure-posts-with-comments-for-a-blog/22116/2 "2017-07-06T00:33:17Z")

</div>


