Node SDK - FTS return max 10 element


#1

Hi all,
(sorry for my english)
i have a web app with couchbase and the relative node sdk.
I use the FTS query for search a word or part of word with wildcard,
I have implemented this code ( i see in developer section ):

var query = SearchQuery.new('fulltextsearch_index', SearchQuery.wildcard(text));
query.fields("*");
db.query(query, function (err, res, meta) {
            if (err) {
                return callback(err);
            }
            callback(res);
  });

I have the response without the error, but return max 10 element.
To see more element i have force insert the parameter “limit”:

    var query = SearchQuery.new('fulltextsearch_index', SearchQuery.wildcard(text));
    query.fields("*");
    query.limit(100);
    db.query(query, function (err, res, meta) {
          if (err) {
               return callback(err);
           }
           callback(res)
    });

My question is: why return max 10 hits? Is it possible that I set something aside without wanting it?


#2

i have find the response (i don’t read alls documents :neutral_face::neutral_face:), in this doucment page there is write:

Size
Represents the number of results requested. The default size is 10. If the size is set to 0, the query returns the count of matches with no other results.

thanks anyway and sorry for the inconvenience