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

post_filter and filter are now the same #670

Merged
merged 1 commit into from
Aug 25, 2014
Merged

Conversation

krzaczek
Copy link
Contributor

resolves #669

This should work fine.

Some of the tests should probably be rewritten to use FIlteredQuery instead of Query->setPostFilter(). The results are fine ... but You should use setPostFilter only to filter results after facets/aggregations have been calculated.

ruflin added a commit that referenced this pull request Aug 25, 2014
post_filter and filter are now the same
@ruflin ruflin merged commit ac63bbf into ruflin:master Aug 25, 2014
@ruflin
Copy link
Owner

ruflin commented Aug 25, 2014

Merged. Thx.

@ruflin
Copy link
Owner

ruflin commented Aug 25, 2014

Hm, I just realised you missed to update the changes.txt file. Can you open a new pull request? Sorry about that.

@krzaczek
Copy link
Contributor Author

Sure :)

@krzaczek
Copy link
Contributor Author

@ruflin maybe we should trigger a php error (E_USER_DEPRECATED) instead of just setting phpdoc to deprecated

bool trigger_error ( string $error_msg [, int $error_type = E_USER_NOTICE ] )

Trigger it in Query->setFilter - this function is deprecated and will be removed in feature realeases
Trigger it in Query->setPostFIlter if array is passed as $filter

@ruflin
Copy link
Owner

ruflin commented Aug 25, 2014

Good idea. It's a little bit messy in the code but the good thing is it will pop up also in the tests.

krzaczek added a commit to krzaczek/Elastica that referenced this pull request Aug 25, 2014
krzaczek added a commit to krzaczek/Elastica that referenced this pull request Aug 25, 2014
krzaczek added a commit to krzaczek/Elastica that referenced this pull request Aug 25, 2014
krzaczek added a commit to krzaczek/Elastica that referenced this pull request Aug 25, 2014
krzaczek added a commit to krzaczek/Elastica that referenced this pull request Aug 25, 2014
krzaczek added a commit to krzaczek/Elastica that referenced this pull request Aug 25, 2014
krzaczek added a commit to krzaczek/Elastica that referenced this pull request Aug 25, 2014
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.

post_filter and filter are now the same
2 participants