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

Rename filter param to search api "post_filter" #4119

Closed
clintongormley opened this Issue Nov 7, 2013 · 3 comments

Comments

Projects
None yet
3 participants
@clintongormley
Member

clintongormley commented Nov 7, 2013

Users tend to use the top-level filter param for general filtering, instead of using a filtered query.

It should be renamed to post_filter to dissuade users from using it unless they understand what it is for and filter should be deprecated.

The top level filter is still valid field for backwards compatibility, but it will removed in the future.

@nik9000

This comment has been minimized.

Show comment
Hide comment
@nik9000

nik9000 Nov 7, 2013

Contributor

I assume I'm using it wrong then:)

Contributor

nik9000 commented Nov 7, 2013

I assume I'm using it wrong then:)

@clintongormley

This comment has been minimized.

Show comment
Hide comment
@clintongormley

clintongormley Nov 7, 2013

Member

:) It should only be used when you want to aggregate facets on the query results, but then filter out some query results before returning the hits, eg:

  • query on brand: gucci
  • facet on: color
  • return results only for: brand:gucci, color: red

If you don't have the faceting requirement, then the color:red filter should be in a filtered query

Member

clintongormley commented Nov 7, 2013

:) It should only be used when you want to aggregate facets on the query results, but then filter out some query results before returning the hits, eg:

  • query on brand: gucci
  • facet on: color
  • return results only for: brand:gucci, color: red

If you don't have the faceting requirement, then the color:red filter should be in a filtered query

@nik9000

This comment has been minimized.

Show comment
Hide comment
@nik9000

nik9000 Nov 7, 2013

Contributor

I'm not sure where I got the idea that I should just shove whatever filters I'm doing there. Maybe I just inferred it from the parameter name. Maybe some rogue documentation.

Contributor

nik9000 commented Nov 7, 2013

I'm not sure where I got the idea that I should just shove whatever filters I'm doing there. Maybe I just inferred it from the parameter name. Maybe some rogue documentation.

@ghost ghost assigned martijnvg Dec 16, 2013

martijnvg added a commit to martijnvg/elasticsearch that referenced this issue Dec 16, 2013

@martijnvg martijnvg closed this in 23d2b1e Dec 16, 2013

martijnvg added a commit that referenced this issue Dec 16, 2013

brusic added a commit to brusic/elasticsearch that referenced this issue Jan 19, 2014

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment