i'm relatively new elasticsearch , need advice. after several tries, did not found solution , that's why need you. i want make conditional query based on document content. let me explain, have documents in es: { "name": "product n°1", "type": "mail", "sub": "letter" }, { "name": "product n°2", "type": "video", "sub": null }, { "name": "product n°3", "type": "mail", "sub": "postcard" } the user can filter types , sub checkboxes (so, user can search more 1 type , sub @ same time) edited customers can selects checkbox types of products want es (for ex: video, image, mail), can select of them. the "document" type has 4 sub-types: letter, postal card, paper, printed , can select sub type want retrieve too. so, admit customer selected video , mail, , letter sub