iOS - Full Text Query Issues



I’ve attempted the “fullTextQuery” a million different ways and can’t seem to get it working. Either an empty array is returned, or when I follow the official Full Text Search instructions on GitHub I get this error:

Error calling sqlite3_step (1: malformed MATCH expression: [Couchbase NEAR (Lite OR mobile)])
Note: I don’t run this exact query but one that follows the suggested format

Here’s my query:

let query = self.database.viewNamed("notes").createQuery()
query.fullTextQuery =  searchText
query.fullTextSnippets = true
        do {
            let enumerator = try
            print("Enumerator: \(enumerator.allObjects)")
            for row in enumerator.allObjects {
                print("Row: \(row)")
        } catch(let error) {
            print("Error while querying: \(error)")

Here’s where I’m emitting:

self.database.viewNamed("notes").setMapBlock("1.2") {
            (doc, emit) in
            if let title = doc["title"] as? String, contents = doc["contents"] as? String {
                let fullTextString = title + " " + contents
                emit(CBLTextKey(fullTextString), doc["title"])

Any help would be greatly appreciated! Thanks in advance.