From 52ccf20965c6473a65baa29d4e9ba3950af5c801 Mon Sep 17 00:00:00 2001 From: Caleb Champlin Date: Sat, 17 Oct 2020 13:43:02 -0600 Subject: [PATCH] Update README --- README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 22d476d..7e0eea7 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ func main() { ). Size(20). Run( - es, + es, es.Search.WithContext(context.TODO()), es.Search.WithIndex("test"), ) @@ -124,6 +124,7 @@ The following queries are currently supported: | `"match_phrase_prefix"` | `MatchPhrasePrefix()` | | `"match_all"` | `MatchAll()` | | `"match_none"` | `MatchNone()` | +| `"multi_match"` | `MultiMatch()` | | `"exists"` | `Exists()` | | `"fuzzy"` | `Fuzzy()` | | `"ids"` | `IDs()` | @@ -158,6 +159,23 @@ The following aggregations are currently supported: | `"top_hits"` | `TopHits()` | | `"terms"` | `TermsAgg()` | +### Supported Top Level Options + +The following top level options are currently supported: + +| ElasticSearch DSL | `esquery.Search` Function | +| ------------------------|--------------------------------------- | +| `"highlight"` | `Highlight()` | +| `"explain"` | `Explain()` | +| `"from"` | `From()` | +| `"postFilter"` | `PostFilter()` | +| `"query"` | `Query()` | +| `"aggs"` | `Aggs()` | +| `"size"` | `Size()` | +| `"sort"` | `Sort()` | +| `"source"` | `SourceIncludes(), SourceExcludes()` | +| `"timeout"` | `Timeout()` | + #### Custom Queries and Aggregations To execute an arbitrary query or aggregation (including those not yet supported by the library), use the `CustomQuery()` or `CustomAgg()` functions, respectively. Both accept any `map[string]interface{}` value.