Is this possible in Couchbase??
SELECT * FROM users WHERE user_name LIKE \'%john%\'.
Seems like I have to use startkey and endkey. But doesn\'t
The startKey and endKey will allow you to do like "john%". Couchbase does not allow you to do a contains.
If you really need a contains you should use the Elastic Search plugin.
Couchbase 4.5+ only
Is needed to create a Full Text Index to be able search for substrings.
See Couchbase reference for more information
NOTE: If you don't see Full text
tab, you have to enable it and setup Full Text Search service (Full Text RAM Quota).