Skip to content

Cypher CREATE INDEX <name> ignores the name, so DROP INDEX <name> is a silent no-op and an unknown name reports success #9705

Closed

Description

@robfrank

Summary

Same shape as #9646, on the index side. CREATE INDEX <name> FOR (n:L) ON (n.p) ignores <name>: executeCreateIndex in OpenCypherQueryEngine builds the index with schema.buildTypeIndex(typeName, propertyNames), so the index is named L[p]. DROP INDEX <name> then looks up an index called <name>, finds none, and executeDropIndex without IF EXISTS calls schema.dropIndex(name), which returns silently when the index is absent and still increments indexesRemoved. So:

  • DROP INDEX <name> after CREATE INDEX <name> ... drops nothing and reports success
  • DROP INDEX nosuchindex (no IF EXISTS) reports success

Expected

CREATE INDEX <name> names the index (or records the name, as #9646 does for constraints via CypherConstraintRegistry), DROP INDEX <name> drops it, and an unknown name raises unless IF EXISTS is given.

Where

engine/src/main/java/com/arcadedb/query/opencypher/query/OpenCypherQueryEngine.java, executeCreateIndex / executeDropIndex. TypeIndexBuilder.withIndexName exists and may be the simplest route.

Found during the completeness sweep for #9646; left out of that PR because it changes index naming, which is visible to SQL and every other client.

Activity

  1. added this to the 26.11.1 milestone on Oct 10, 2026
  2. added
    engine
    on Oct 10, 2026
  3. added
    severity:minor
    on Oct 10, 2026
  4. added
    in progress
    on Oct 11, 2026
  5. self-assigned this
    on Oct 11, 2026
  6. added a commit that references this issue on Oct 11, 2026
  7. lvca commented on Oct 11, 2026

    @lvca
    Member

    Fixed in #9742 (release 26.11.1).

    Cypher CREATE INDEX <name> ... ignored the name, so DROP INDEX <name> could not find the index afterwards. Now:

    • the index keeps the name you give it, also after a database restart
    • creating an index with a name already used by another index or constraint fails (or does nothing with IF NOT EXISTS)
    • DROP INDEX of an unknown name raises an error unless IF EXISTS is used, matching Neo4j
    • DROP INDEX refuses an index that backs a constraint (drop the constraint instead), and DROP CONSTRAINT no longer drops a plain non-unique index

    ❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.

  8. removed
    in progress
    on Oct 11, 2026
  9. added a commit that references this issue on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugengineopencypherseverity:minor

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions