1
votes

Hi I have a test doc like this:

{
  "doctype": "test",
  "users": [
    1,
    2
  ]
}

Then I used below query to get the result:

SELECT * FROM bucket WHERE doctype = "test" AND ANY user IN users SATISFIES user = 1 END;

But I got this error: "msg": "syntax error - at user". Who knows where I got wrong? Thanks

1

1 Answers

2
votes

USER is a reserved word.

You can use u instead, or place USER in back ticks to escape it.