Skip to content

Commit

Permalink
Switch doc links to 6.7
Browse files Browse the repository at this point in the history
  • Loading branch information
olivere committed Mar 29, 2019
1 parent 1900b03 commit fa7c1d1
Show file tree
Hide file tree
Showing 201 changed files with 351 additions and 352 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG-6.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ Only use `true` or `false` for boolean values, not `0` or `1` or `on` or `off`.

Notice that 6.0 and future versions will default to single type indices, i.e. you may not use multiple types when e.g. adding an index with a mapping.

See [here for details](https://www.elastic.co/guide/en/elasticsearch/reference/6.x/removal-of-types.html#_what_are_mapping_types).
See [here for details](https://www.elastic.co/guide/en/elasticsearch/reference/6.7/removal-of-types.html#_what_are_mapping_types).

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import "github.com/olivere/elastic"

Elastic 6.0 targets Elasticsearch 6.x which was [released on 14th November 2017](https://www.elastic.co/blog/elasticsearch-6-0-0-released).

Notice that there are a lot of [breaking changes in Elasticsearch 6.0](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/breaking-changes-6.0.html)
Notice that there are a lot of [breaking changes in Elasticsearch 6.0](https://www.elastic.co/guide/en/elasticsearch/reference/6.7/breaking-changes-6.0.html)
and we used this as an opportunity to [clean up and refactor Elastic](https://github.com/olivere/elastic/blob/release-branch.v6/CHANGELOG-6.0.md)
as we did in the transition from earlier versions of Elastic.

Expand Down Expand Up @@ -410,4 +410,4 @@ MIT-LICENSE. See [LICENSE](http://olivere.mit-license.org/)
or the LICENSE file provided in the repository for details.


[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Folivere%2Felastic.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Folivere%2Felastic?ref=badge_large)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Folivere%2Felastic.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Folivere%2Felastic?ref=badge_large)
4 changes: 2 additions & 2 deletions bulk.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
// reuse BulkService to send many batches. You do not have to create a new
// BulkService for each batch.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-bulk.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-bulk.html
// for more details.
type BulkService struct {
client *Client
Expand Down Expand Up @@ -94,7 +94,7 @@ func (s *BulkService) Timeout(timeout string) *BulkService {
// changes to be made visible by a refresh before reying), or "false"
// (no refresh related actions). The default value is "false".
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-refresh.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-refresh.html
// for details.
func (s *BulkService) Refresh(refresh string) *BulkService {
s.refresh = refresh
Expand Down
4 changes: 2 additions & 2 deletions bulk_delete_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

// BulkDeleteRequest is a request to remove a document from Elasticsearch.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-bulk.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-bulk.html
// for details.
type BulkDeleteRequest struct {
BulkableRequest
Expand Down Expand Up @@ -128,7 +128,7 @@ func (r *BulkDeleteRequest) String() string {

// Source returns the on-wire representation of the delete request,
// split into an action-and-meta-data line and an (optional) source line.
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-bulk.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-bulk.html
// for details.
func (r *BulkDeleteRequest) Source() ([]string, error) {
if r.source != nil {
Expand Down
8 changes: 4 additions & 4 deletions bulk_index_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

// BulkIndexRequest is a request to add a document to Elasticsearch.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-bulk.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-bulk.html
// for details.
type BulkIndexRequest struct {
BulkableRequest
Expand Down Expand Up @@ -95,7 +95,7 @@ func (r *BulkIndexRequest) Id(id string) *BulkIndexRequest {

// OpType specifies if this request should follow create-only or upsert
// behavior. This follows the OpType of the standard document index API.
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-index_.html#operation-type
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-index_.html#operation-type
// for details.
func (r *BulkIndexRequest) OpType(opType string) *BulkIndexRequest {
r.opType = opType
Expand Down Expand Up @@ -128,7 +128,7 @@ func (r *BulkIndexRequest) Version(version int64) *BulkIndexRequest {
// VersionType specifies how versions are created. It can be e.g. internal,
// external, external_gte, or force.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-index_.html#index-versioning
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-index_.html#index-versioning
// for details.
func (r *BulkIndexRequest) VersionType(versionType string) *BulkIndexRequest {
r.versionType = versionType
Expand Down Expand Up @@ -169,7 +169,7 @@ func (r *BulkIndexRequest) String() string {

// Source returns the on-wire representation of the index request,
// split into an action-and-meta-data line and an (optional) source line.
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-bulk.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-bulk.html
// for details.
func (r *BulkIndexRequest) Source() ([]string, error) {
// { "index" : { "_index" : "test", "_type" : "type1", "_id" : "1" } }
Expand Down
12 changes: 6 additions & 6 deletions bulk_update_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

// BulkUpdateRequest is a request to update a document in Elasticsearch.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-bulk.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-bulk.html
// for details.
type BulkUpdateRequest struct {
BulkableRequest
Expand Down Expand Up @@ -120,8 +120,8 @@ func (r *BulkUpdateRequest) Parent(parent string) *BulkUpdateRequest {
}

// Script specifies an update script.
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-bulk.html#bulk-update
// and https://www.elastic.co/guide/en/elasticsearch/reference/6.2/modules-scripting.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-bulk.html#bulk-update
// and https://www.elastic.co/guide/en/elasticsearch/reference/6.7/modules-scripting.html
// for details.
func (r *BulkUpdateRequest) Script(script *Script) *BulkUpdateRequest {
r.script = script
Expand All @@ -132,7 +132,7 @@ func (r *BulkUpdateRequest) Script(script *Script) *BulkUpdateRequest {
// ScripedUpsert specifies if your script will run regardless of
// whether the document exists or not.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-update.html#_literal_scripted_upsert_literal
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-update.html#_literal_scripted_upsert_literal
func (r *BulkUpdateRequest) ScriptedUpsert(upsert bool) *BulkUpdateRequest {
r.scriptedUpsert = &upsert
r.source = nil
Expand Down Expand Up @@ -172,7 +172,7 @@ func (r *BulkUpdateRequest) Doc(doc interface{}) *BulkUpdateRequest {
// DocAsUpsert indicates whether the contents of Doc should be used as
// the Upsert value.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-update.html#_literal_doc_as_upsert_literal
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-update.html#_literal_doc_as_upsert_literal
// for details.
func (r *BulkUpdateRequest) DocAsUpsert(docAsUpsert bool) *BulkUpdateRequest {
r.docAsUpsert = &docAsUpsert
Expand Down Expand Up @@ -218,7 +218,7 @@ func (r *BulkUpdateRequest) String() string {

// Source returns the on-wire representation of the update request,
// split into an action-and-meta-data line and an (optional) source line.
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-bulk.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-bulk.html
// for details.
func (r *BulkUpdateRequest) Source() ([]string, error) {
// { "update" : { "_index" : "test", "_type" : "type1", "_id" : "1", ... } }
Expand Down
2 changes: 1 addition & 1 deletion cat_aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
// CatAliasesService shows information about currently configured aliases
// to indices including filter and routing infos.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/cat-aliases.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/cat-aliases.html
// for details.
type CatAliasesService struct {
client *Client
Expand Down
2 changes: 1 addition & 1 deletion cat_allocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
// CatAllocationService provides a snapshot of how many shards are allocated
// to each data node and how much disk space they are using.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/cat-allocation.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/cat-allocation.html
// for details.
type CatAllocationService struct {
client *Client
Expand Down
2 changes: 1 addition & 1 deletion cat_count.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
// CatCountService provides quick access to the document count of the entire cluster,
// or individual indices.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/cat-count.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/cat-count.html
// for details.
type CatCountService struct {
client *Client
Expand Down
2 changes: 1 addition & 1 deletion cat_health.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
// CatHealthService returns a terse representation of the same information
// as /_cluster/health.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/cat-health.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/cat-health.html
// for details.
type CatHealthService struct {
client *Client
Expand Down
2 changes: 1 addition & 1 deletion cat_indices.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
// CatIndicesService returns the list of indices plus some additional
// information about them.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/cat-indices.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/cat-indices.html
// for details.
type CatIndicesService struct {
client *Client
Expand Down
2 changes: 1 addition & 1 deletion clear_scroll.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

// ClearScrollService clears one or more scroll contexts by their ids.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-request-scroll.html#_clear_scroll_api
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/search-request-scroll.html#_clear_scroll_api
// for details.
type ClearScrollService struct {
client *Client
Expand Down
6 changes: 3 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ type Client struct {
//
// If the sniffer is enabled (the default), the new client then sniffes
// the cluster via the Nodes Info API
// (see https://www.elastic.co/guide/en/elasticsearch/reference/6.2/cluster-nodes-info.html#cluster-nodes-info).
// (see https://www.elastic.co/guide/en/elasticsearch/reference/6.7/cluster-nodes-info.html#cluster-nodes-info).
// It uses the URLs specified by the caller. The caller is responsible
// to only pass a list of URLs of nodes that belong to the same cluster.
// This sniffing process is run on startup and periodically.
Expand Down Expand Up @@ -1456,7 +1456,7 @@ func (c *Client) BulkProcessor() *BulkProcessorService {

// Reindex copies data from a source index into a destination index.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-reindex.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-reindex.html
// for details on the Reindex API.
func (c *Client) Reindex() *ReindexService {
return NewReindexService(c)
Expand Down Expand Up @@ -1627,7 +1627,7 @@ func (c *Client) Flush(indices ...string) *IndicesFlushService {

// SyncedFlush performs a synced flush.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-synced-flush.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/indices-synced-flush.html
// for more details on synched flushes and how they differ from a normal
// Flush.
func (c *Client) SyncedFlush(indices ...string) *IndicesSyncedFlushService {
Expand Down
2 changes: 1 addition & 1 deletion cluster_reroute.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
// one node to another explicitly, an allocation can be cancelled, and
// an unassigned shard can be explicitly allocated to a specific node.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-reroute.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/cluster-reroute.html
// for details.
type ClusterRerouteService struct {
client *Client
Expand Down
2 changes: 1 addition & 1 deletion cluster_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

// ClusterStateService allows to get a comprehensive state information of the whole cluster.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/cluster-state.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/cluster-state.html
// for details.
type ClusterStateService struct {
client *Client
Expand Down
2 changes: 1 addition & 1 deletion cluster_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

// ClusterStatsService is documented at
// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/cluster-stats.html.
// https://www.elastic.co/guide/en/elasticsearch/reference/6.7/cluster-stats.html.
type ClusterStatsService struct {
client *Client
pretty bool
Expand Down
4 changes: 2 additions & 2 deletions delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
// DeleteService allows to delete a typed JSON document from a specified
// index based on its id.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-delete.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-delete.html
// for details.
type DeleteService struct {
client *Client
Expand Down Expand Up @@ -100,7 +100,7 @@ func (s *DeleteService) Parent(parent string) *DeleteService {

// Refresh the index after performing the operation.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-refresh.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-refresh.html
// for details.
func (s *DeleteService) Refresh(refresh string) *DeleteService {
s.refresh = refresh
Expand Down
8 changes: 4 additions & 4 deletions delete_by_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

// DeleteByQueryService deletes documents that match a query.
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-delete-by-query.html.
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-delete-by-query.html.
type DeleteByQueryService struct {
client *Client
index []string
Expand Down Expand Up @@ -242,7 +242,7 @@ func (s *DeleteByQueryService) Query(query Query) *DeleteByQueryService {

// Refresh indicates whether the effected indexes should be refreshed.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-refresh.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-refresh.html
// for details.
func (s *DeleteByQueryService) Refresh(refresh string) *DeleteByQueryService {
s.refresh = refresh
Expand Down Expand Up @@ -303,9 +303,9 @@ func (s *DeleteByQueryService) Size(size int) *DeleteByQueryService {
}

// Slices represents the number of slices (default: 1).
// It used to be a number, but can be set to "auto" as of 6.3.
// It used to be a number, but can be set to "auto" as of 6.7.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-delete-by-query.html#docs-delete-by-query-automatic-slice
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-delete-by-query.html#docs-delete-by-query-automatic-slice
// for details.
func (s *DeleteByQueryService) Slices(slices interface{}) *DeleteByQueryService {
s.slices = slices
Expand Down
4 changes: 2 additions & 2 deletions exists.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

// ExistsService checks for the existence of a document using HEAD.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-get.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-get.html
// for details.
type ExistsService struct {
client *Client
Expand Down Expand Up @@ -70,7 +70,7 @@ func (s *ExistsService) Realtime(realtime bool) *ExistsService {

// Refresh the shard containing the document before performing the operation.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-refresh.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-refresh.html
// for details.
func (s *ExistsService) Refresh(refresh string) *ExistsService {
s.refresh = refresh
Expand Down
2 changes: 1 addition & 1 deletion explain.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

// ExplainService computes a score explanation for a query and
// a specific document.
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-explain.html.
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/search-explain.html.
type ExplainService struct {
client *Client
pretty bool
Expand Down
2 changes: 1 addition & 1 deletion fetch_source_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
// with various endpoints, e.g. when searching for documents, retrieving
// individual documents, or even updating documents.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-request-source-filtering.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/search-request-source-filtering.html
// for details.
type FetchSourceContext struct {
fetchSource bool
Expand Down
2 changes: 1 addition & 1 deletion field_caps.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

// FieldCapsService allows retrieving the capabilities of fields among multiple indices.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-field-caps.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/search-field-caps.html
// for details
type FieldCapsService struct {
client *Client
Expand Down
4 changes: 2 additions & 2 deletions get.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
// GetService allows to get a typed JSON document from the index based
// on its id.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-get.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-get.html
// for details.
type GetService struct {
client *Client
Expand Down Expand Up @@ -104,7 +104,7 @@ func (s *GetService) FetchSourceContext(fetchSourceContext *FetchSourceContext)

// Refresh the shard containing the document before performing the operation.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-refresh.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-refresh.html
// for details.
func (s *GetService) Refresh(refresh string) *GetService {
s.refresh = refresh
Expand Down
2 changes: 1 addition & 1 deletion highlight.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package elastic

// Highlight allows highlighting search results on one or more fields.
// For details, see:
// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-request-highlighting.html
// https://www.elastic.co/guide/en/elasticsearch/reference/6.7/search-request-highlighting.html
type Highlight struct {
fields []*HighlighterField
tagsSchema *string
Expand Down
6 changes: 3 additions & 3 deletions index.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
// IndexService adds or updates a typed JSON document in a specified index,
// making it searchable.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-index_.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-index_.html
// for details.
type IndexService struct {
client *Client
Expand Down Expand Up @@ -81,7 +81,7 @@ func (s *IndexService) Pipeline(pipeline string) *IndexService {

// Refresh the index after performing the operation.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-refresh.html
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-refresh.html
// for details.
func (s *IndexService) Refresh(refresh string) *IndexService {
s.refresh = refresh
Expand Down Expand Up @@ -175,7 +175,7 @@ func (s *IndexService) buildURL() (string, string, url.Values, error) {
})
} else {
// Automatic ID generation
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-index_.html#index-creation
// See https://www.elastic.co/guide/en/elasticsearch/reference/6.7/docs-index_.html#index-creation
method = "POST"
path, err = uritemplates.Expand("/{index}/{type}/", map[string]string{
"index": s.index,
Expand Down
Loading

0 comments on commit fa7c1d1

Please sign in to comment.