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

How to Implement Boolean Filter #135

Open
ErenPhayte opened this issue May 19, 2016 · 1 comment
Open

How to Implement Boolean Filter #135

ErenPhayte opened this issue May 19, 2016 · 1 comment

Comments

@ErenPhayte
Copy link

ErenPhayte commented May 19, 2016

Hi,

Its not 100% clear how to filter using Boolean . I have a category in elastic search that I need to filter on but its returning more than just that category. Any idea?

@ErenPhayte ErenPhayte changed the title Sorting with Searcher? Implement Boolean Filter May 19, 2016
@ErenPhayte ErenPhayte changed the title Implement Boolean Filter How to Implement Boolean Filter May 19, 2016
@ErenPhayte
Copy link
Author

I feel like the clue is where I need to set a filter:

"query": {
    "bool": {
      "filter": [
        { "term":  { "custom_category": "custom_keyword" }}
      ]
  }
}

using add_filter('elasticsearch_searcher_query' ...

So that the results ONLY get that custom_category and nothing else.

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

No branches or pull requests

1 participant