1. search request/response
1.1. search request
1.1.1. components
1.1.1.1. e.g.
1.1.1.1.1. Untitled
1.1.1.2. query
1.1.1.2.1. query DSL
1.1.1.2.2. filter DSL
1.1.1.3. size
1.1.1.3.1. the amount of documents to return
1.1.1.4. from
1.1.1.4.1. to do pagination
1.1.1.4.2. ignorer to determine the second page of 10 items, elastic search has to calculate the top 20 items
1.1.1.5. _source
1.1.1.5.1. specify how _source field returns
1.1.1.6. sort
1.1.2. specify scope
1.1.2.1. Untitled
1.1.3. formats
1.1.3.1. URL-based search request
1.1.3.1.1. Untitled
1.1.3.1.2. Untitled
1.1.3.1.3. Untitled
1.1.3.1.4. Untitled
1.1.3.2. request body-based search request
1.1.3.2.1. Untitled
1.1.3.2.2. Untitled
1.1.3.2.3. Untitled
1.1.3.2.4. Untitled
1.2. search response
1.2.1. Untitled
1.2.2. Untitled
2. query and filter DSL
2.1. queries
2.1.1. match_all
2.1.1.1. def
2.1.1.1.1. match all documents
2.1.1.2. use case
2.1.1.2.1. when want to use a filter instead of a query
2.1.1.3. example
2.1.1.3.1. return all docs
2.1.1.3.2. use a filter
2.1.2. query_string
2.1.2.1. fields being searched
2.1.2.1.1. by default _all field
2.1.2.1.2. can be changed
2.1.2.2. example
2.1.2.2.1. can be issued from either url / request boy
2.1.2.2.2. Untitled
2.1.2.3. cons
2.1.2.3.1. might put elastic search cluster at risk
2.1.2.4. pros
2.1.2.4.1. easy to use
2.1.3. term query / filter
2.1.3.1. def
2.1.3.1.1. allows you to specify a field and term to search for within your documents
2.1.3.1.2. search for multiple items in a document's field
2.1.3.1.3. force min number of match
2.1.3.1.4. limit results by exactly matching tokens
2.1.3.2. term query
2.1.3.2.1. Untitled
2.1.3.3. term filter
2.1.3.3.1. Untitled
2.1.4. terms query
2.1.4.1. def
2.1.4.1.1. search for multiple terms in a document's field
2.1.4.2. terms query
2.1.4.2.1. Untitled
2.1.5. match query and term filter
2.1.5.1. def
2.1.5.1.1. Untitled
2.1.5.1.2. similar to terms query
2.1.5.2. match query behaviors
2.1.5.2.1. boolean
2.1.5.2.2. phrase query
2.1.6. phrase_prefix query
2.1.6.1. use case
2.1.6.1.1. running autocomplete for a search box
2.1.6.2. example
2.1.6.2.1. Untitled
2.1.6.2.2. Untitled
2.1.6.3. max_expansion
2.1.7. multi_match
2.1.7.1. def
2.1.7.1.1. allows you to search for a value across multiple fields
2.1.7.2. example
2.1.7.2.1. Untitled
2.1.8. range query / filter
2.1.8.1. parameters
2.1.8.1.1. Untitled
2.1.8.2. query
2.1.8.2.1. Untitled
2.1.8.3. filter
2.1.8.3.1. Untitled
2.1.9. prefix query / filter
2.1.9.1. query
2.1.9.1.1. Untitled
2.1.9.2. filter
2.1.9.2.1. Untitled
2.1.10. wildcard query
2.1.10.1. example
2.1.10.1.1. query
2.1.10.1.2. result
2.2. compound queries
2.2.1. boolean query
2.2.1.1. bool clause types
2.2.1.1.1. must
2.2.1.1.2. must_not
2.2.1.1.3. should
2.2.1.1.4. Untitled
2.2.1.2. example
2.2.1.2.1. Untitled
2.2.2. bool filter
2.2.2.1. def
2.2.2.1.1. like bool queries
2.2.2.2. example
2.2.2.2.1. Untitled
2.2.2.2.2. Untitled
2.3. query for field exists
2.3.1. exists filter
2.3.1.1. Untitled
2.3.2. missing filter
2.3.2.1. Untitled
2.3.2.2. Untitled
2.3.3. transform any query into filter
2.3.3.1. Untitled
2.3.3.2. Untitled
2.4. filters vs queries
2.4.1. def
2.4.1.1. filter returns a simple "yes or no" answer rather than a score
2.4.1.2. filter are cacheable because they do not calculate the score
2.4.2. process
2.4.2.1. Untitled
2.4.3. filter cache mechanisms
2.4.3.1. Untitled
2.4.4. filtered query example
2.4.4.1. two components
2.4.4.1.1. the query
2.4.4.1.2. the filter
2.4.4.2. Untitled