Skip to content

Cypher CREATE INDEX should implicitly create the referenced property (Neo4j-style lazy schema) #4354

Closed

Description

@lvca

Context

Reported by a user migrating from Neo4j in the blog post Moving a Graph RAG system from Neo4j to ArcadeDB (May 2026, against ArcadeDB 26.4.1-SNAPSHOT).

Problem

To create an index on a vertex property via Cypher, the user must run three statements in order:

  1. Create the vertex type.
  2. Create the property (with explicit type).
  3. Create the index.

Skipping step 2 (or running the statements out of order) currently fails with a 500 error / cryptic message. Neo4j allows the simpler workflow:

CREATE INDEX FOR (n:Worker) ON (n.name)

…and infers the type / property automatically.

Why it matters

This is one of the biggest friction points when porting an existing Neo4j codebase: every CREATE INDEX must be rewritten as a three-statement preamble, and the order matters. Migration tools (Liquibase-style, ETL bootstrap scripts) typically just issue the index DDL.

Expected

When Cypher CREATE INDEX ... FOR (n:Label) ON (n.prop) references a label or property that does not yet exist:

  • create the vertex/edge type if missing (defaulting to vertex unless context implies edge);
  • create the property with an inferred type (default ANY, or upgrade later on first insert);
  • then create the index.

If a property type is required for the index (e.g. FULL_TEXT, VECTOR), keep the current explicit-property requirement only for those cases and emit a clear error message.

Notes

Closely related to the cryptic "missing index type" error that was already improved in #4227 (df34542). This issue is the next-level UX gap: schema inference rather than just better errors.

Activity

  1. added
    enhancement
    on May 26, 2026
  2. added this to the 26.6.1 milestone on May 26, 2026
  3. self-assigned this
    on May 26, 2026
  4. added a commit that references this issue on Jun 2, 2026
  5. added theissue type on Jun 2, 2026
  6. added a commit that references this issue on Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementopencypher

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions