The syntax above looks correct and jives with the documentation. The bool query takes "must", "should", 'must_not" and "filter." "filter" is treated as a "must" that has no scoring.
Can you explain what you mean by 'not working'? Does it cause an error or is it not working logically as you expect?
The answers on the linked page don't seem to be going in the right direction to me. They seem more convoluted than should be required here.