Can CBLTableViewDataSource be used with Full Text Searching? Can't seem to 
get it working and thought it might have something to do with the fact that 
the results are CBLFullTextQueryRows.

Here is how I am creating the view:

+ (CBLQuery *)searchJobsInDatabase:(CBLDatabase* )db

{

    CBLView *view = [db viewNamed:@"jobSearchResults"];

    if (!view.mapBlock) {

        [view setMapBlock: MAPBLOCK({

        if ([doc[@"type"] isEqualToString:kListDocType]) {

            *NSString *body = stripHTMLTags(doc[@"jobNumber"]);*

            emit(CBLTextKey(body), doc[@"jobNumber"]);

        }

        }) reduceBlock:NULL version: @"1"];

    }

    return [view createQuery];

}

And here is now I am setting the data source:

self.dataSource.query = [Job searchJobsInDatabase:database].asLiveQuery;

self.dataSource.query.fullTextQuery = @"999";


Todd

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/871c653f-bed6-47cc-be4a-915f03ea7622%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to