join the nosql movement they're also temporarily stored within elasticsearch in case you use the same filter twice aggregations can be compared to the sql groupbuckets of words will be createdand for each bucket relevant statistics can be calculated each of these three compartments has loads of options and featuresmaking elaborating on the entire language here impossible luckilythere' no need to go into the complexity that elasticsearch queries can represent we'll use the "query string query language, way to query the data that closely resembles the google search query language iffor instanceyou want search term to be mandatoryyou add plus (+signif you want to exclude the search termyou use minus (-sign querying elasticsearch isn' recommended because it decreases performancethe search engine first needs to translate the query string into its native json query language but for your purposes it will work nicelyalsoperformance won' be factor on the several thousand records you have in your index now it' time to query your disease data project primary objectivediagnosing disease by its symptoms if you ever saw the popular television series house the sentence "it' never lupusmay sound familiar lupus is type of autoimmune diseasewhere the body' immune system attacks healthy parts of the body let' see what symptoms your search engine would need to determine that you're looking for lupus start off with three symptomsfatiguefeverand joint pain your imaginary patient has all three of them (and more)so make them all mandatory by adding plus sign before each onelisting "simple query stringelasticsearch query with three mandatory keywords the dictionary named searchbody contains the search request information we'll send we want the name field in our results the query part other things are possible herelike aggregations more on that later simple query string is type of query that takes input in much the same way the google homepage would searchbody="fields":["name"]these fields are the fields "query":in which it needs to search they are not to be confused "simple_query_stringwith the fields it has to "query"'+fatigue+fever+"joint pain"'return in the search results "fields"["fulltext","title^ ","name^ "(specified in the second code line aboveclient search(index=indexname,doc_type=doctypebody=searchbodyfrom_ searchfromsize=searchsizelike query on google the sign indicates the term is mandatory encapsulating two or more words in quotes signals you want to find them exactly like this the search is executed variables indexnamedoctypesearchfromand searchsize were declared earlierindexname "medicaldoctype="diseasessearchfrom searchsize