Is couchbase suitable for storing comment thread

I need to implement a system where users can enter an arbitrary number (thought not too many) ordered comments. It’s a bit like a comment thread. I want to store one comment thread in a document, and use an array to store each comment. Is this something that will work in couchbase?

Full text search over all comments would also be an added benefit.

1 Like

I think that the use case is a typical example to utilize flexible json data structure in Couchbase.
In a simple inclusion model, it is needed to take care of the size limit of a document. Max value size is 20MB. Please refer to documentation for details.
It is an option to set the max size of a comment and the max size of the thread in a document. The max size can be the system’s specification or the internal threshold with which additional mechanism is implemented to create another document to save comments when the number (or total size) of thread is exceeded. Either way, when the number of comments exceeds a certain amount, human cannot see them at a glance, and also network traffic and display information should be technically constant.
I also agree with you about the benefit of full text search.
I hope this helps.

1 Like

Yes, Couchbase can be used to store comment threads. It has the ability to handle large scale data and can easily be scaled as your needs grow. Additionally, Couchbase is a fast and reliable database that can provide your users with a great experience.
Regard: chasemycloud

1 Like

As others have stated Couchbase works wonderfully for your use case the built-in full-text search should easily be able to meet your needs for something basic. For really complex requirements we have a connector to Elastic Search, but from the sounds of your requirements, I don’t think you need to complicate your architecture that much. For more information on Full Text Search we have a lot of great info in our docs:

https://docs.couchbase.com/server/current/fts/fts-introduction.html