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

#736: Additional Request Body Options for Percolator #737

Merged
merged 2 commits into from
Jan 21, 2015

Conversation

ck99
Copy link
Contributor

@ck99 ck99 commented Dec 23, 2014

Fixes #736

const EXTRA_AGGS = 'aggs';
const EXTRA_HIGHLIGHT = 'highlight';

private $extraRequestBodyOptions = array(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use $_* for private and protected variables (naming convention).

@ruflin
Copy link
Owner

ruflin commented Dec 29, 2014

Thank you for the addition. Can you adjust the naming of the function and variable? I assume with the next commit the tests should pass as I'm not sure why some failed before.

@@ -93,7 +115,26 @@ public function matchExistingDoc($id, $type, $query = null, $params = array())
$id = urlencode($id);
$path = $this->_index->getName() . '/' . $type . '/'. $id . '/_percolate';

return $this->_percolate($path, $query, array(), $params);
$data = array();
$this->applyAdditionalRequestBodyOptions($params, $data);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should also be mentioned in the function params that these options can be set through param (line 110)

@ruflin ruflin merged commit 0275154 into ruflin:master Jan 21, 2015
@ruflin
Copy link
Owner

ruflin commented Jan 21, 2015

@ck99 Sorry for the delay. Now it is finally 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.

Percolator: Support "additional request body options" per the ElasticSearch official documentation
2 participants