Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

E208

For the complete documentation index optimized for AI agents, see llms.txt.

Field Has Not Been Indexed

Erroneous Code Example

This error occurs when you try to use a field in an operation that requires the field to be indexed, but the field has not been marked with INDEX in the schema.

QUERY findUserByEmail(email: String) =>
    users <- N<User>::WHERE(|u| u.email == email)
    RETURN users
N::User {
    name: String,
    email: String,
}

Solution

Add the INDEX modifier to the field in your schema.

N::User {
    name: String,
    email: String INDEX,
}