Couchbase Scope and Collection

Hi Folks,

Is there anyway we can move items from one collection to other collection with in the same bucket.
Thanks,
Debasis

If you’re using the Query service you can:

INSERT INTO ... SELECT ... FROM

followed by a DELETE from the original (to effect the move) but this likely won’t be the best performance so probably not ideal if you’re looking to move vast volumes.

You could also explore the Eventing service for achieving this.

HTH.

Thanks but is there anyway in CB GUI to create document under particular collection.
Thanks,
Debasis

To just create, you can simply navigate in the UI to the target collection under Cluster > Documents (select the collection via the drop-lists) then “Add Document” in the upper right and complete the pop-up; the document will be created as part of the selected collection.

(This interface doesn’t allow you to move documents from one collection to another.)

If you already have the documents externally, then of course the import interface is likely what you’re after: Import Documents | Couchbase Docs

HTH.