Remove unusable elasticsearch opts

This commit is contained in:
ionutboangiu
2024-11-27 18:03:16 +02:00
committed by Dan Christian Bogos
parent 2a32ade4ba
commit f1cdf920df
8 changed files with 0 additions and 110 deletions

View File

@@ -22,14 +22,12 @@ import (
"context"
"fmt"
"os"
"strconv"
"strings"
"sync"
"github.com/elastic/elastic-transport-go/v8/elastictransport"
"github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/optype"
"github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/refresh"
"github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/versiontype"
"github.com/cgrates/cgrates/config"
"github.com/cgrates/cgrates/utils"
@@ -177,12 +175,6 @@ func (e *ElasticEE) ExportEvent(event any, key string) error {
Request(event).
Refresh(refresh.True)
if opts.IfPrimaryTerm != nil {
req.IfPrimaryTerm(strconv.Itoa(*opts.IfPrimaryTerm))
}
if opts.IfSeqNo != nil {
req.IfSeqNo(strconv.Itoa(*opts.IfSeqNo))
}
if opts.OpType != nil {
req.OpType(optype.OpType{Name: *opts.OpType})
}
@@ -195,12 +187,6 @@ func (e *ElasticEE) ExportEvent(event any, key string) error {
if opts.Timeout != nil {
req.Timeout((*opts.Timeout).String())
}
if opts.Version != nil {
req.Version(strconv.Itoa(*opts.Version))
}
if opts.VersionType != nil {
req.VersionType(versiontype.VersionType{Name: *opts.VersionType})
}
if opts.WaitForActiveShards != nil {
req.WaitForActiveShards(*opts.WaitForActiveShards)
}