See Boolean Query
QueryBuilder qb = boolQuery() .must(termQuery("content", "test1")) .must(termQuery("content", "test4")) .mustNot(termQuery("content", "test2")) .should(termQuery("content", "test3"));
must query
must not query
should query
Most Popular
Video
Get Started with Elasticsearch
Intro to Kibana
ELK for Logs & Metrics