Create an Entity Using Gradle

You must create an entity before you can define the mappings between your source data and the publicly accessible data.

Before you begin

You need:

Procedure

  1. Open a command-line window, and go to your project root directory.
  2. At your project root, run the Gradle task hubCreateEntity.
    ./gradlew hubCreateEntity -PentityName=your-entity-name -igradlew.bat hubCreateEntity -PentityName=your-entity-name -i
  3. Edit the new entity definition in your-project-root/entities/your-entity-name.entity.json.

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