Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion dist/elastic.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! elastic.js - v1.1.1 - 2014-03-21
/*! elastic.js - v1.1.1 - 2014-08-25
* https://github.com/fullscale/elastic.js
* Copyright (c) 2014 FullScale Labs, LLC; Licensed MIT */

Expand Down Expand Up @@ -9852,6 +9852,22 @@
return this;
},

/**
Sets the boost factor value for all documents matching the query.

@member ejs.FunctionScoreQuery
@param {Float} boost A positive <code>float</code> value.
@returns {Object} returns <code>this</code> so that calls can be chained.
*/
boost_factor: function(boost){
if (boost == null) {
return query.function_score.boost_factor;
}

query.function_score.boost_factor = boost;
return this;
},

/**
Add a single score function to the list of existing functions.

Expand Down
6 changes: 3 additions & 3 deletions dist/elastic.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"main": "elastic.js",
"scripts": {
"test": "grunt nodeunit",
"prepublish": "cp dist/elastic.js ."
"install": "cp dist/elastic.js ."
},
"dependencies": {
"elasticsearch": "*",
Expand Down
16 changes: 16 additions & 0 deletions src/query/FunctionScoreQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,22 @@
return this;
},

/**
Sets the boost factor value for all documents matching the query.

@member ejs.FunctionScoreQuery
@param {Float} boost A positive <code>float</code> value.
@returns {Object} returns <code>this</code> so that calls can be chained.
*/
boost_factor: function(boost){
if (boost == null) {
return query.function_score.boost_factor;
}

query.function_score.boost_factor = boost;
return this;
},

/**
Add a single score function to the list of existing functions.

Expand Down