Skip to content
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

Merged
merged 19 commits into from
Jan 21, 2015

Conversation

jdeniau
Copy link
Contributor

@jdeniau jdeniau commented Dec 19, 2014

The weight now replace the boost_factor since the 1.4.0.

I also fixed #492 by replacing the scale_weight parameter by the weight

@ruflin
Copy link
Owner

ruflin commented Dec 21, 2014

@jdeniau Thx. Could you also add a test for it to make sure it works as expected?

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) when pulling 86cc03d on jdeniau:weight-in-function-score into c8b6848 on ruflin:master.

@jdeniau
Copy link
Contributor Author

jdeniau commented Dec 22, 2014

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();
Copy link
Owner

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).

@ruflin
Copy link
Owner

ruflin commented Dec 23, 2014

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

@jdeniau
Copy link
Contributor Author

jdeniau commented Dec 23, 2014

Once the #738 is fixed and merged, I will update this PR

@jdeniau jdeniau force-pushed the weight-in-function-score branch from 5fdc9b6 to a698916 Compare January 21, 2015 10:18
@jdeniau jdeniau mentioned this pull request Jan 21, 2015
ruflin added a commit that referenced this pull request Jan 21, 2015
Implement the `weight` in the function score query
@ruflin ruflin merged commit 67880da into ruflin:master Jan 21, 2015
@ruflin
Copy link
Owner

ruflin commented Jan 21, 2015

Merged. Thx :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FunctionScore: scale_weight is not a supported by elasticsearch
3 participants