You are currently browsing legacy 4.0 version of documentation. Click here to switch to the newest 4.2 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

Create New Document



Create New Document

  • From the Documents View click New Document.

    Figure 1. Create New Document

  • Edit the new document

    Figure 2. Edit the New Document

  • 1 - Enter document ID - see the examples below

    • Any collection name can be entered as a prefix.
    • The collection name will be created if it doesn't exist yet.
    • If no collection name is specified, i.e. the ID string doesn't end with ( / ) or ( | ),
      then the document will be added to the @empty collection.
  • 2 - Edit document content
    Edit the document fields, the above document content showing is just an initial template.

  • 3 - Click Save when done

Create New Document in Current Collection

  • Open the down arrow and click Create New Document in Current Collection.

    Figure 3. Create New Document in Current Collection

  • Edit the new document

    Figure 4. Edit the New Document

  • 1 - Enter document ID

    • The current collection name is initially suggested.
    • Any other collection name of your choice can still be entered,
      document creation will be handled as described above in 'Create New Document'.
  • 2 - Edit document content

    • Edit the document fields
    • If all the documents in the collection have the same 'structure', i.e. same fields,
      then the initial document content showing will be those fields.
      (In the above example the fields are: 'ID Type' & 'Name')
    • If not all documents share the exact same fields,
      then the initial document content will be just the initial template as in 'Create New Document'.
  • 3 - Click Save when done

Create New Document from Clone

  • A new document can be created by cloning (creating a copy without attachments) from an opened document view
  • The clone can be saved with a new ID

Document ID Types - Examples

Figure 5. IDs Examples

IDs Examples

  1. Semantic ID
    This ID was generated by entering the actual string in the document ID.
    i.e. "users/ayende@hr.com"

  2. Server-Side ID
    This ID was generated by entering: "users/" in the document ID.
    Note: the first document was created from node 'A' while the other one from node 'B'.

  3. Identity
    This ID was generated by entering: "users|" in the document ID.

  4. GUID
    This ID was generated by leaving the document ID field empty and just clicking 'Save'