-
Notifications
You must be signed in to change notification settings - Fork 736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement the weight
in the function score query
#735
Conversation
@jdeniau Thx. Could you also add a test for it to make sure it works as expected? |
Can you help me with the failing tests ? I change the Elasticsearch version to use the 1.4.2 but there is a weird but with the index. Thanks |
@@ -29,7 +30,7 @@ class FunctionScore extends AbstractQuery | |||
const DECAY_EXPONENTIAL = 'exp'; | |||
const DECAY_LINEAR = 'linear'; | |||
|
|||
protected $_functions = array(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep the naming of protected variables as they are (naming convention).
It looks like the breaking tests are because of ES 1.4.2 and not your changes. I suggest we split up these two pull requests. First we "upgrade" to ES 1.4.2 and then we merge in your changes here. So we exactly now which changes are breaking the tests. I started a branch for 1.4.0 here but this can can be discarded: https://github.com/ruflin/Elastica/tree/elasticsearch-1.4.0 |
Once the #738 is fixed and merged, I will update this PR |
There is an issue with that: ruflin#712 But as the Client object has a public setLogger method with a strong dependency on LoggerInterface, the psr/log is automatically a strong dependancy of the package.
The [weight](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html#_weight) now replace the `boost_factor` since the 1.4.0. I also fixed ruflin#492 by replacing the `scale_weight` parameter by the `weight`
deprecated the addBoostFactorFunction
5fdc9b6
to
a698916
Compare
Implement the `weight` in the function score query
Merged. Thx :-) |
The weight now replace the
boost_factor
since the 1.4.0.I also fixed #492 by replacing the
scale_weight
parameter by theweight