Couchbase.Linq.CouchbaseQueryException: 'syntax error - at ='


I have a bucket with different types of objects in it. The type of these objects is detailed in an attribute called “SystemType” which has an integer value which matches to an Enum on my server side.

I’m using Linq2Couchbase to execute Linq queries and search for all objects of a given SystemType.
An example of the queries is the following:
var ComponentsList = DataContext.Context.Query().Where(x => x.SystemType == SystemTypes.Component).ToList();
where Context is a Couchbase.Linq.BucketContext.

The thing is this works for queries where I use other attributes such as SystemIdentifier or Title, which all of my objects in Couchbase have but whenever I try to do a query with the SystemType it throws the exception: " Couchbase.Linq.CouchbaseQueryException: ‘syntax error - at =’ ".

I’m kind of lost and don’t know what else to try to solve the problem.

Gonçalo Castilho


What version of Linq2Couchbase are you using currently?

Also, could you turn on Debug level logging for the Couchbase.Linq namespace and then provide the full query text? Be sure to redact any sensitive information before posting.

If you don’t have Couchbase logging configured, information about setup is available here:

1 Like


Thanks for your help.
The problem was in my code as the Objects I was introducing in Couchbase did not have the SystemType marked as a DataMember.

Using the Debug level logging for the Couchbase.Linq I noticed that the query was being built without the parameter name.

btw I’m going to leave here the link for the configuration of the logging because I didn’t know how to enable it and this could help someone else: