Skip to content

Commit

Permalink
fix issue #264
Browse files Browse the repository at this point in the history
  • Loading branch information
ts-thomas committed Oct 3, 2022
1 parent 811b7e1 commit c9308a7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ Document.prototype.search = function(query, limit, options, _resolve){
if(!limit && is_object(query)){

options = /** @type {Object} */ (query);
query = options["query"];
query = "";
}
else if(is_object(limit)){

Expand All @@ -506,12 +506,13 @@ Document.prototype.search = function(query, limit, options, _resolve){
}
else{

query = options["query"] || query;
pluck = options["pluck"];
field = pluck || options["index"] || options["field"] /*|| (is_string(options) && [options])*/;
tag = SUPPORT_TAGS && options["tag"];
enrich = SUPPORT_STORE && this.store && options["enrich"];
bool = options["bool"] === "and";
limit = options["limit"] || 100;
limit = options["limit"] || limit || 100;
offset = options["offset"] || 0;

if(tag){
Expand Down

0 comments on commit c9308a7

Please sign in to comment.