search-collapse #6
20
README.md
20
README.md
|
@ -76,7 +76,7 @@ func main() {
|
||||||
).
|
).
|
||||||
Size(20).
|
Size(20).
|
||||||
Run(
|
Run(
|
||||||
es,
|
es,
|
||||||
es.Search.WithContext(context.TODO()),
|
es.Search.WithContext(context.TODO()),
|
||||||
es.Search.WithIndex("test"),
|
es.Search.WithIndex("test"),
|
||||||
)
|
)
|
||||||
|
@ -124,6 +124,7 @@ The following queries are currently supported:
|
||||||
| `"match_phrase_prefix"` | `MatchPhrasePrefix()` |
|
| `"match_phrase_prefix"` | `MatchPhrasePrefix()` |
|
||||||
| `"match_all"` | `MatchAll()` |
|
| `"match_all"` | `MatchAll()` |
|
||||||
| `"match_none"` | `MatchNone()` |
|
| `"match_none"` | `MatchNone()` |
|
||||||
|
| `"multi_match"` | `MultiMatch()` |
|
||||||
| `"exists"` | `Exists()` |
|
| `"exists"` | `Exists()` |
|
||||||
| `"fuzzy"` | `Fuzzy()` |
|
| `"fuzzy"` | `Fuzzy()` |
|
||||||
| `"ids"` | `IDs()` |
|
| `"ids"` | `IDs()` |
|
||||||
|
@ -158,6 +159,23 @@ The following aggregations are currently supported:
|
||||||
| `"top_hits"` | `TopHits()` |
|
| `"top_hits"` | `TopHits()` |
|
||||||
| `"terms"` | `TermsAgg()` |
|
| `"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
|
#### 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.
|
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.
|
||||||
|
|
Loading…
Reference in New Issue