Create an Entity Using QuickStart

Before you begin

You need:

Procedure


QuickStart - Entities

  1. In QuickStart's navigation bar, click Entities.
  2. Click the wrench icon () to open the entity tools control.
  3. Click + New Entity.
  4. In the New Entity form, set Title to the name of the entity.
  5. Set Base URI to the prefix you want for the URIs of the ingested documents.
  6. Under Properties, add the data fields that you want to standardize among your data sources.

    An entity property declares a field name and a data type for information that you make available to apps. These properties are later mapped to the corresponding fields in your ingested data.

    You can add more properties later if you need to standardize more fields.

    • To add a new property, click the Add New icon () and fill in the new row.
      Field Description
      Name The name by which you want apps to access this piece of data. This can be different from the actual name of the associated field in the source data.
      Type The type that apps should expect this piece of data to be.
      This can be different from the actual type of the associated field in the source data. If the type conversion is not simple, you can:
      • use predefined or custom functions in the mapping step to calculate the value, or
      • replace the mapping step with a custom step, which must link to a custom module that performs the type conversion.

      To nest another entity in the host entity or to create a link to an external entity, expand the Type dropdown and scroll to the bottom of the data types:

      • To nest another entity in the host entity, choose one of the entity models in the Entities section of the list.
      • To create a link to an external entity, go to the External Refs section of the list and click New External Ref....

      QuickStart - Nested Entities - Type property dropdown

      Cardinality If an entity can have more than one instance of this property, choose 1..∞. Otherwise, 1..1.
      Description (Optional) Description of the entity property.
      Index Settings
      QuickStart - Entities - Primary Key property

      Enable the indexing you want for this property by hovering over the empty spot in the property row under the appropriate index setting icon. When the gray icon appears in the empty spot, click to enable that type of indexing.

      Range indexes can be configured in entity definitions to improve performance. Learn more: Indexing in MarkLogic

      See Index Settings for a description of the index setting icons.

    • To delete a property, select that property row by checking its box, and then click the trash icon ().
      QuickStart - Entities - delete a property

  7. Click Save.
  8. If prompted to update the index, click Yes if you already have data ingested in the database. Otherwise, No.

Results

An entity card is created.


Entity card

  • To resize the entity card, drag the lower right-hand corner.
  • To edit the entity, click the pencil icon () at the top right corner of the card.
  • To delete the entity, click the trash icon () at the top right corner of the card.
  • See Index Settings for a description of the index setting icons.