Skip to content
This repository was archived by the owner on Nov 21, 2026. It is now read-only.
This repository was archived by the owner on Nov 21, 2026. It is now read-only.

bindings docs: ordered reads need MANDATORY with NOTNULL (ArcadeDB #8701), and Cypher reads the index in order only ascending (ArcadeDB #8724) #26

Closed

Description

@tae898

docs/guide/core/queries.md ("Ordered reads over an optional property", added in #24) tells readers that from 26.10.1 the null scan of an ascending ORDER BY p LIMIT k is skipped when p is declared NOTNULL, and its example declares (notnull true) alone. ArcadeData#8701 shows that NOTNULL rejects only an explicit null: a record that never sets p is accepted, has no key in the index, and on the current 26.10.1 snapshot is dropped from the ordered read. Only MANDATORY with NOTNULL rules out both cases, so the advice should name both.

The paragraph also says "Descending reads are not affected", which is true of SQL only. Measured today on the 26.10.1 snapshot 2fa02b3dde (ArcadeData#8724), openCypher reads the index in order over a whole label only for an ascending ORDER BY n.p LIMIT k with no WHERE on a default-null-strategy index; a descending read, WHERE n.p IS NOT NULL, or an index created with NULL_STRATEGY INDEX (the paragraph's own recommendation) scans the label, about 0.8 to 1.1 s against 0.5 to 1.7 ms at 1,000,000 vertices. A range predicate on p is served in either direction.

Fix: name MANDATORY and NOTNULL together, scope the descending sentence to SQL, and add a paragraph on the Cypher behavior with the range workaround.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions