Commit Graph

12 Commits

Author SHA1 Message Date
Maxim Yanchuk 90226c236a FIX import & go.sum & simple issues 2023-11-02 00:30:33 +03:00
Maxim Yanchuk bc3cec49c2 Merge remote-tracking branch 'origin/master' into es8 2023-11-02 00:14:33 +03:00
Roman 5761bdcd5d Support Elasticsearch v8 2022-09-26 16:38:45 +03:00
danta 4951f7774d feat: add support for collapse 2021-06-11 10:18:13 +08:00
Hardy 49a92fc25e
Features: SearchAfter、Term Aggregation Order、Aggregation Include Filter Values (#14)
* Add support for multi_match queries

* Add support for highlights

* Add support for nested aggregations and filtered aggregations

* Update README

* Fix formatting

* fix

* feat: add support for search after

* fix:set search after []string to []interface

* fix:add .gitignore

* feat:Support for term aggs order

* Feat: Support include filter for termAggs

* Update aggregations_test.go

Fix conflict.

* Update go.mod

Co-authored-by: Caleb Champlin <caleb.champlin@gmail.com>
Co-authored-by: Hardy <caoxiaozhen@secnium.com>
Co-authored-by: Oran Moshai <12291998+oranmoshai@users.noreply.github.com>
2021-03-15 09:43:59 +02:00
Hardy c2b5f62823
Merge branch 'master' into master 2021-03-15 10:32:29 +08:00
Caleb Champlin fc16427405
Features: Filter Aggregations, Nested Aggregations, Multi Match Queries, Highlights (#12)
* Add support for multi_match queries

* Add support for highlights

* Add support for nested aggregations and filtered aggregations

* Update README

* Fix formatting
2021-03-14 09:50:22 +02:00
Hardy bdfe2df171 fix:set search after []string to []interface 2021-03-02 13:30:39 +08:00
Hardy 09acfd6a3d feat: add support for search after 2021-03-02 11:51:41 +08:00
Caleb Champlin f7d496389e Add support for highlights 2020-10-17 13:42:23 -06:00
Ido Perlmuter b3b6dff2be
Support _source, sort and post_filter in search requests (#10)
* Add support for post filter in Search

Search requests can now accept a post filter applied after all hits were
returned from the database. For example:

    esquery.Search().
        Query(...).
        Aggs(...).
        PostFilter(esquery.Range(field).Gt(0)).
        Run(...)

* Add support for _source and sort in search requests

This commit adds the ability to use the "sort" and "_source" attributes
in search requests, via the new methods Sort, SourceIncludes and
SourceExcludes.
2020-05-21 15:44:53 +03:00
Ido Perlmuter 8e5dea816b
Add Search() function, two new aggregations (#7)
This commit implements a Search() function, which allow for running
search requests with both a query and aggregations. This function is
meant to more accurately implement the structure of search requests
accepted by ElasticSearch's Search API.

The Query() and Aggregate() functions are still included by the library,
but now simply call Search() internally, making them simple shortcuts.

Two new aggregations are also added: "terms" and "top_hits". These are
implemented a bit differently than previously implemented ones. The
structs and methods for ElasticSearch queries and aggregations will
eventually be auto-generated from a specification file, and will look
more like the new implementations of these new aggregations.
2020-04-06 12:03:42 +03:00