Skip to content

Commit

Permalink
GOCBC-746: Removed all references to N1QL, CBAS and FTS.
Browse files Browse the repository at this point in the history
Change-Id: I8edb4cd828e46bc4d7d0a4c5a610fd8f7dbc3e28
Reviewed-on: http://review.couchbase.org/120547
Reviewed-by: Brett Lawson <brett19@gmail.com>
Tested-by: Brett Lawson <brett19@gmail.com>
  • Loading branch information
brett19 committed Jan 19, 2020
1 parent b593443 commit 8811819
Show file tree
Hide file tree
Showing 15 changed files with 160 additions and 160 deletions.
8 changes: 4 additions & 4 deletions cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,10 @@ func (c *Cluster) parseExtraConnStrOptions(spec gocbconnstr.ConnSpec) error {
return optValue[len(optValue)-1], true
}

if valStr, ok := fetchOption("n1ql_timeout"); ok {
if valStr, ok := fetchOption("query_timeout"); ok {
val, err := strconv.ParseInt(valStr, 10, 64)
if err != nil {
return fmt.Errorf("n1ql_timeout option must be a number")
return fmt.Errorf("query_timeout option must be a number")
}
c.sb.QueryTimeout = time.Duration(val) * time.Millisecond
}
Expand Down Expand Up @@ -524,15 +524,15 @@ func (c *Cluster) AnalyticsIndexes() *AnalyticsIndexManager {
}
}

// QueryIndexes returns a QueryIndexManager for managing N1QL indexes.
// QueryIndexes returns a QueryIndexManager for managing query indexes.
func (c *Cluster) QueryIndexes() *QueryIndexManager {
return &QueryIndexManager{
cluster: c,
tracer: c.sb.Tracer,
}
}

// SearchIndexes returns a SearchIndexManager for managing Search indexes.
// SearchIndexes returns a SearchIndexManager for managing search indexes.
func (c *Cluster) SearchIndexes() *SearchIndexManager {
return &SearchIndexManager{
cluster: c,
Expand Down
22 changes: 11 additions & 11 deletions cluster_analyticsindexes.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (am *AnalyticsIndexManager) CreateDataverse(dataverseName string, opts *Cre
}

span := am.tracer.StartSpan("CreateDataverse", nil).
SetTag("couchbase.service", "cbas")
SetTag("couchbase.service", "analytics")
defer span.Finish()

var ignoreStr string
Expand Down Expand Up @@ -152,7 +152,7 @@ func (am *AnalyticsIndexManager) DropDataverse(dataverseName string, opts *DropA
}

span := am.tracer.StartSpan("DropDataverse", nil).
SetTag("couchbase.service", "cbas")
SetTag("couchbase.service", "analytics")
defer span.Finish()

var ignoreStr string
Expand Down Expand Up @@ -196,7 +196,7 @@ func (am *AnalyticsIndexManager) CreateDataset(datasetName, bucketName string, o
}

span := am.tracer.StartSpan("CreateDataset", nil).
SetTag("couchbase.service", "cbas")
SetTag("couchbase.service", "analytics")
defer span.Finish()

var ignoreStr string
Expand Down Expand Up @@ -247,7 +247,7 @@ func (am *AnalyticsIndexManager) DropDataset(datasetName string, opts *DropAnaly
}

span := am.tracer.StartSpan("DropDataset", nil).
SetTag("couchbase.service", "cbas")
SetTag("couchbase.service", "analytics")
defer span.Finish()

var ignoreStr string
Expand Down Expand Up @@ -287,7 +287,7 @@ func (am *AnalyticsIndexManager) GetAllDatasets(opts *GetAllAnalyticsDatasetsOpt
}

span := am.tracer.StartSpan("GetAllDatasets", nil).
SetTag("couchbase.service", "cbas")
SetTag("couchbase.service", "analytics")
defer span.Finish()

q := "SELECT d.* FROM Metadata.`Dataset` d WHERE d.DataverseName <> \"Metadata\""
Expand Down Expand Up @@ -344,7 +344,7 @@ func (am *AnalyticsIndexManager) CreateIndex(datasetName, indexName string, fiel
}

span := am.tracer.StartSpan("CreateIndex", nil).
SetTag("couchbase.service", "cbas")
SetTag("couchbase.service", "analytics")
defer span.Finish()

var ignoreStr string
Expand Down Expand Up @@ -392,7 +392,7 @@ func (am *AnalyticsIndexManager) DropIndex(datasetName, indexName string, opts *
}

span := am.tracer.StartSpan("DropIndex", nil).
SetTag("couchbase.service", "cbas")
SetTag("couchbase.service", "analytics")
defer span.Finish()

var ignoreStr string
Expand Down Expand Up @@ -432,7 +432,7 @@ func (am *AnalyticsIndexManager) GetAllIndexes(opts *GetAllAnalyticsIndexesOptio
}

span := am.tracer.StartSpan("GetAllIndexes", nil).
SetTag("couchbase.service", "cbas")
SetTag("couchbase.service", "analytics")
defer span.Finish()

q := "SELECT d.* FROM Metadata.`Index` d WHERE d.DataverseName <> \"Metadata\""
Expand Down Expand Up @@ -477,7 +477,7 @@ func (am *AnalyticsIndexManager) ConnectLink(opts *ConnectAnalyticsLinkOptions)
}

span := am.tracer.StartSpan("ConnectLink", nil).
SetTag("couchbase.service", "cbas")
SetTag("couchbase.service", "analytics")
defer span.Finish()

if opts.LinkName == "" {
Expand Down Expand Up @@ -512,7 +512,7 @@ func (am *AnalyticsIndexManager) DisconnectLink(opts *DisconnectAnalyticsLinkOpt
}

span := am.tracer.StartSpan("DisconnectLink", nil).
SetTag("couchbase.service", "cbas")
SetTag("couchbase.service", "analytics")
defer span.Finish()

if opts.LinkName == "" {
Expand Down Expand Up @@ -545,7 +545,7 @@ func (am *AnalyticsIndexManager) GetPendingMutations(opts *GetPendingMutationsAn
}

span := am.tracer.StartSpan("GetPendingMutations", nil).
SetTag("couchbase.service", "cbas")
SetTag("couchbase.service", "analytics")
defer span.Finish()

req := mgmtRequest{
Expand Down
4 changes: 2 additions & 2 deletions cluster_analyticsquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (warning *AnalyticsWarning) fromData(data jsonAnalyticsWarning) error {
return nil
}

// AnalyticsMetaData provides access to the meta-data properties of a N1QL query result.
// AnalyticsMetaData provides access to the meta-data properties of a query result.
type AnalyticsMetaData struct {
RequestID string
ClientContextID string
Expand Down Expand Up @@ -114,7 +114,7 @@ func (meta *AnalyticsMetaData) fromData(data jsonAnalyticsResponse) error {
return nil
}

// AnalyticsResult allows access to the results of a N1QL query.
// AnalyticsResult allows access to the results of a query.
type AnalyticsResult struct {
reader *gocbcore.AnalyticsRowReader

Expand Down
6 changes: 3 additions & 3 deletions cluster_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (warning *QueryWarning) fromData(data jsonQueryWarning) error {
return nil
}

// QueryMetaData provides access to the meta-data properties of a N1QL query result.
// QueryMetaData provides access to the meta-data properties of a query result.
type QueryMetaData struct {
RequestID string
ClientContextID string
Expand Down Expand Up @@ -129,7 +129,7 @@ func (meta *QueryMetaData) fromData(data jsonQueryResponse) error {
return nil
}

// QueryResult allows access to the results of a N1QL query.
// QueryResult allows access to the results of a query.
type QueryResult struct {
reader *gocbcore.N1QLRowReader

Expand Down Expand Up @@ -220,7 +220,7 @@ func (r *QueryResult) MetaData() (*QueryMetaData, error) {
return &metaData, nil
}

// Query executes the N1QL query statement on the server.
// Query executes the query statement on the server.
func (c *Cluster) Query(statement string, opts *QueryOptions) (*QueryResult, error) {
if opts == nil {
opts = &QueryOptions{}
Expand Down
16 changes: 8 additions & 8 deletions cluster_queryindexes.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"time"
)

// QueryIndexManager provides methods for performing Couchbase N1ql index management.
// QueryIndexManager provides methods for performing Couchbase query index management.
type QueryIndexManager struct {
cluster *Cluster

Expand Down Expand Up @@ -150,7 +150,7 @@ func (qm *QueryIndexManager) CreateIndex(bucketName, indexName string, fields []
}

span := qm.tracer.StartSpan("CreateIndex", nil).
SetTag("couchbase.service", "n1ql")
SetTag("couchbase.service", "query")
defer span.Finish()

return qm.createIndex(span.Context(), bucketName, indexName, fields, createQueryIndexOptions{
Expand Down Expand Up @@ -178,7 +178,7 @@ func (qm *QueryIndexManager) CreatePrimaryIndex(bucketName string, opts *CreateP
}

span := qm.tracer.StartSpan("CreatePrimaryIndex", nil).
SetTag("couchbase.service", "n1ql")
SetTag("couchbase.service", "query")
defer span.Finish()

return qm.createIndex(
Expand Down Expand Up @@ -247,7 +247,7 @@ func (qm *QueryIndexManager) DropIndex(bucketName, indexName string, opts *DropQ
}

span := qm.tracer.StartSpan("DropIndex", nil).
SetTag("couchbase.service", "n1ql")
SetTag("couchbase.service", "query")
defer span.Finish()

return qm.dropIndex(
Expand Down Expand Up @@ -277,7 +277,7 @@ func (qm *QueryIndexManager) DropPrimaryIndex(bucketName string, opts *DropPrima
}

span := qm.tracer.StartSpan("DropPrimaryIndex", nil).
SetTag("couchbase.service", "n1ql")
SetTag("couchbase.service", "query")
defer span.Finish()

return qm.dropIndex(
Expand All @@ -304,7 +304,7 @@ func (qm *QueryIndexManager) GetAllIndexes(bucketName string, opts *GetAllQueryI
}

span := qm.tracer.StartSpan("GetAllIndexes", nil).
SetTag("couchbase.service", "n1ql")
SetTag("couchbase.service", "query")
defer span.Finish()

return qm.getAllIndexes(span.Context(), bucketName, opts)
Expand Down Expand Up @@ -360,7 +360,7 @@ func (qm *QueryIndexManager) BuildDeferredIndexes(bucketName string, opts *Build
}

span := qm.tracer.StartSpan("BuildDeferredIndexes", nil).
SetTag("couchbase.service", "n1ql")
SetTag("couchbase.service", "query")
defer span.Finish()

indexList, err := qm.getAllIndexes(
Expand Down Expand Up @@ -448,7 +448,7 @@ func (qm *QueryIndexManager) WatchIndexes(bucketName string, watchList []string,
}

span := qm.tracer.StartSpan("WatchIndexes", nil).
SetTag("couchbase.service", "n1ql")
SetTag("couchbase.service", "query")
defer span.Finish()

if opts.WatchPrimary {
Expand Down
26 changes: 13 additions & 13 deletions cluster_searchindexes.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (si *SearchIndex) toData() (jsonSearchIndex, error) {
return data, nil
}

// SearchIndexManager provides methods for performing Couchbase FTS index management.
// SearchIndexManager provides methods for performing Couchbase search index management.
type SearchIndexManager struct {
cluster *Cluster

Expand Down Expand Up @@ -118,7 +118,7 @@ func (sm *SearchIndexManager) GetAllIndexes(opts *GetAllSearchIndexOptions) ([]S
}

span := sm.tracer.StartSpan("GetAllIndexes", nil).
SetTag("couchbase.service", "fts")
SetTag("couchbase.service", "search")
defer span.Finish()

req := mgmtRequest{
Expand Down Expand Up @@ -179,7 +179,7 @@ func (sm *SearchIndexManager) GetIndex(indexName string, opts *GetSearchIndexOpt
}

span := sm.tracer.StartSpan("GetIndex", nil).
SetTag("couchbase.service", "fts")
SetTag("couchbase.service", "search")
defer span.Finish()

req := mgmtRequest{
Expand Down Expand Up @@ -241,7 +241,7 @@ func (sm *SearchIndexManager) UpsertIndex(indexDefinition SearchIndex, opts *Ups
}

span := sm.tracer.StartSpan("UpsertIndex", nil).
SetTag("couchbase.service", "fts")
SetTag("couchbase.service", "search")
defer span.Finish()

indexData, err := indexDefinition.toData()
Expand Down Expand Up @@ -295,7 +295,7 @@ func (sm *SearchIndexManager) DropIndex(indexName string, opts *DropSearchIndexO
}

span := sm.tracer.StartSpan("DropIndex", nil).
SetTag("couchbase.service", "fts")
SetTag("couchbase.service", "search")
defer span.Finish()

req := mgmtRequest{
Expand Down Expand Up @@ -335,7 +335,7 @@ func (sm *SearchIndexManager) AnalyzeDocument(indexName string, doc interface{},
}

span := sm.tracer.StartSpan("AnalyzeDocument", nil).
SetTag("couchbase.service", "fts")
SetTag("couchbase.service", "search")
defer span.Finish()

b, err := json.Marshal(doc)
Expand Down Expand Up @@ -397,7 +397,7 @@ func (sm *SearchIndexManager) GetIndexedDocumentsCount(indexName string, opts *G
}

span := sm.tracer.StartSpan("GetIndexedDocumentsCount", nil).
SetTag("couchbase.service", "fts")
SetTag("couchbase.service", "search")
defer span.Finish()

req := mgmtRequest{
Expand Down Expand Up @@ -478,7 +478,7 @@ func (sm *SearchIndexManager) PauseIngest(indexName string, opts *PauseIngestSea
}

span := sm.tracer.StartSpan("PauseIngest", nil).
SetTag("couchbase.service", "fts")
SetTag("couchbase.service", "search")
defer span.Finish()

return sm.performControlRequest(
Expand Down Expand Up @@ -507,7 +507,7 @@ func (sm *SearchIndexManager) ResumeIngest(indexName string, opts *ResumeIngestS
}

span := sm.tracer.StartSpan("ResumeIngest", nil).
SetTag("couchbase.service", "fts")
SetTag("couchbase.service", "search")
defer span.Finish()

return sm.performControlRequest(
Expand Down Expand Up @@ -536,7 +536,7 @@ func (sm *SearchIndexManager) AllowQuerying(indexName string, opts *AllowQueryin
}

span := sm.tracer.StartSpan("AllowQuerying", nil).
SetTag("couchbase.service", "fts")
SetTag("couchbase.service", "search")
defer span.Finish()

return sm.performControlRequest(
Expand Down Expand Up @@ -565,7 +565,7 @@ func (sm *SearchIndexManager) DisallowQuerying(indexName string, opts *AllowQuer
}

span := sm.tracer.StartSpan("DisallowQuerying", nil).
SetTag("couchbase.service", "fts")
SetTag("couchbase.service", "search")
defer span.Finish()

return sm.performControlRequest(
Expand Down Expand Up @@ -594,7 +594,7 @@ func (sm *SearchIndexManager) FreezePlan(indexName string, opts *AllowQueryingSe
}

span := sm.tracer.StartSpan("FreezePlan", nil).
SetTag("couchbase.service", "fts")
SetTag("couchbase.service", "search")
defer span.Finish()

return sm.performControlRequest(
Expand Down Expand Up @@ -623,7 +623,7 @@ func (sm *SearchIndexManager) UnfreezePlan(indexName string, opts *AllowQuerying
}

span := sm.tracer.StartSpan("UnfreezePlan", nil).
SetTag("couchbase.service", "fts")
SetTag("couchbase.service", "search")
defer span.Finish()

return sm.performControlRequest(
Expand Down
Loading

0 comments on commit 8811819

Please sign in to comment.