Skip to content

Commit

Permalink
Don't put the cart before the horse (min_score)
Browse files Browse the repository at this point in the history
  • Loading branch information
gneissone committed May 25, 2016
1 parent 04a43e1 commit e55d421
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions es.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,6 @@ function elasticSearchQuery(params) {
ftq = {"match_all" : {}}
}

if (min_score) {
qs['min_score'] = min_score;
}

// if there are filter constraints (filter_must) then we create a filtered query,
// otherwise make a normal query
var qs = undefined;
Expand All @@ -315,7 +311,11 @@ function elasticSearchQuery(params) {
} else {
qs = {"query" : ftq}
}


if (min_score) {
qs['min_score'] = min_score;
}

// sort order and direction
options.sort && options.sort.length > 0 ? qs['sort'] = options.sort : "";

Expand Down

0 comments on commit e55d421

Please sign in to comment.