Filtering by a single type's field

I'm searching through several types of objects in elastic and was wondering if I can filter results by just one type's field. For example, I have books and magazines objects and book object has boolean property "paperback". So I want to get all books and magazines, except the ones where books.paperback = false.
What would be the easiest way to achieve that? Thanks!

Is books the only type that has a paperback field? If yes, you can just use a must_not clase on that field. Otherwise, you will have to combine it with a type query.

Thanks! Yes, this is the case. I was using a rather old version of Elastic with and filters. Must_not does exactly what I needed.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.