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 remove request filters? #1158

Closed
shochdoerfer opened this issue Oct 25, 2018 · 3 comments
Closed

How to remove request filters? #1158

shochdoerfer opened this issue Oct 25, 2018 · 3 comments
Labels

Comments

@shochdoerfer
Copy link
Contributor

I needed to remove one of the defined request filters. I tried to create a custom elasticsuite_search_request.xml file in my own module and remove the filter there. Unfortunately that did not work. Is there any way to remove or customize filters of pre-defined requests?

@romainruaud
Copy link
Collaborator

Hello @shochdoerfer

You can create a custom elasticsuite_search_request.xml file and define a dummy filter that has the same key of one of the existing filter.

Your dummy implementation should just return nothing.

Let me know if it works.

@shochdoerfer
Copy link
Contributor Author

Will give it a try. Currently I used the DI preferences to achieve the same but that really feels like a bad idea :P

@shochdoerfer
Copy link
Contributor Author

Works fine. Thank you.

shochdoerfer added a commit to bitExpert-forks/elasticsuite that referenced this issue Oct 26, 2018
…et filter

Basically an extension due to the discussion in Smile-SA#1158. Since one does not
need to return a \Smile\ElasticsuiteCore\Search\Request\QueryInterface the
doc block comment should indicate that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants