Skip to content

Commit

Permalink
chore: upgrade bleve to v2.3.9 (#8948)
Browse files Browse the repository at this point in the history
  • Loading branch information
mangalaman93 committed Aug 16, 2023
1 parent 2bd6569 commit 3fb8185
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 99 deletions.
17 changes: 10 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/HdrHistogram/hdrhistogram-go v1.1.2
github.com/Masterminds/semver/v3 v3.1.0
github.com/Shopify/sarama v1.27.2
github.com/blevesearch/bleve v1.0.13
github.com/blevesearch/bleve/v2 v2.3.9
github.com/dgraph-io/badger/v4 v4.2.0
github.com/dgraph-io/dgo/v230 v230.0.1
github.com/dgraph-io/gqlgen v0.13.2
Expand All @@ -27,7 +27,7 @@ require (
github.com/getsentry/sentry-go v0.6.0
github.com/go-sql-driver/mysql v0.0.0-20190330032241-c0f6b444ad8f
github.com/gogo/protobuf v1.3.2
github.com/golang/geo v0.0.0-20170810003146-31fb0106dc4a
github.com/golang/geo v0.0.0-20210211234256-740aa86cb551
github.com/golang/glog v1.0.0
github.com/golang/protobuf v1.5.2
github.com/golang/snappy v0.0.3
Expand All @@ -45,8 +45,8 @@ require (
github.com/prometheus/client_golang v1.14.0
github.com/soheilhy/cmux v0.1.4
github.com/spf13/cast v1.3.0
github.com/spf13/cobra v0.0.5
github.com/spf13/pflag v1.0.3
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.7.1
github.com/stretchr/testify v1.8.4
github.com/twpayne/go-geom v1.0.5
Expand All @@ -72,9 +72,13 @@ require (
github.com/agnivade/levenshtein v1.0.3 // indirect
github.com/apache/thrift v0.13.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.2.0 // indirect
github.com/blevesearch/bleve_index_api v1.0.5 // indirect
github.com/blevesearch/geo v0.1.17 // indirect
github.com/blevesearch/go-porterstemmer v1.0.3 // indirect
github.com/blevesearch/segment v0.9.0 // indirect
github.com/blevesearch/segment v0.9.1 // indirect
github.com/blevesearch/snowballstem v0.9.0 // indirect
github.com/blevesearch/upsidedown_store_api v1.0.2 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
Expand All @@ -94,7 +98,7 @@ require (
github.com/hashicorp/go-uuid v1.0.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/vault/sdk v0.1.13 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jcmturner/gofork v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.12.3 // indirect
Expand All @@ -120,7 +124,6 @@ require (
github.com/spf13/jwalterweatherman v1.0.0 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/tinylib/msgp v1.1.0 // indirect
github.com/willf/bitset v1.1.10 // indirect
github.com/xdg/stringprep v1.0.0 // indirect
go.uber.org/atomic v1.6.0 // indirect
go.uber.org/multierr v1.5.0 // indirect
Expand Down
57 changes: 23 additions & 34 deletions go.sum

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions tok/bleve.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
package tok

import (
"github.com/blevesearch/bleve/analysis"
"github.com/blevesearch/bleve/analysis/analyzer/custom"
"github.com/blevesearch/bleve/analysis/token/lowercase"
"github.com/blevesearch/bleve/analysis/token/unicodenorm"
"github.com/blevesearch/bleve/analysis/tokenizer/unicode"
"github.com/blevesearch/bleve/registry"
"github.com/blevesearch/bleve/v2/analysis"
"github.com/blevesearch/bleve/v2/analysis/analyzer/custom"
"github.com/blevesearch/bleve/v2/analysis/token/lowercase"
"github.com/blevesearch/bleve/v2/analysis/token/unicodenorm"
"github.com/blevesearch/bleve/v2/analysis/tokenizer/unicode"
"github.com/blevesearch/bleve/v2/registry"

"github.com/dgraph-io/dgraph/x"
)
Expand All @@ -31,7 +31,7 @@ const unicodenormName = "unicodenorm_nfkc"

var (
bleveCache = registry.NewCache()
termAnalyzer, fulltextAnalyzer *analysis.Analyzer
termAnalyzer, fulltextAnalyzer analysis.Analyzer
)

// setupBleve creates bleve filters and analyzers that we use for term and fulltext tokenizers.
Expand Down
40 changes: 20 additions & 20 deletions tok/stemmers.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,26 @@
package tok

import (
"github.com/blevesearch/bleve/analysis"
_ "github.com/blevesearch/bleve/analysis/lang/ar" // Needed for bleve language support.
_ "github.com/blevesearch/bleve/analysis/lang/cjk"
_ "github.com/blevesearch/bleve/analysis/lang/ckb"
_ "github.com/blevesearch/bleve/analysis/lang/da"
_ "github.com/blevesearch/bleve/analysis/lang/de"
_ "github.com/blevesearch/bleve/analysis/lang/es"
_ "github.com/blevesearch/bleve/analysis/lang/fi"
_ "github.com/blevesearch/bleve/analysis/lang/fr"
_ "github.com/blevesearch/bleve/analysis/lang/hi"
_ "github.com/blevesearch/bleve/analysis/lang/hu"
_ "github.com/blevesearch/bleve/analysis/lang/it"
_ "github.com/blevesearch/bleve/analysis/lang/nl"
_ "github.com/blevesearch/bleve/analysis/lang/no"
_ "github.com/blevesearch/bleve/analysis/lang/pt"
_ "github.com/blevesearch/bleve/analysis/lang/ro"
_ "github.com/blevesearch/bleve/analysis/lang/ru"
_ "github.com/blevesearch/bleve/analysis/lang/sv"
_ "github.com/blevesearch/bleve/analysis/lang/tr"
_ "github.com/blevesearch/bleve/analysis/token/porter"
"github.com/blevesearch/bleve/v2/analysis"
_ "github.com/blevesearch/bleve/v2/analysis/lang/ar" // Needed for bleve language support.
_ "github.com/blevesearch/bleve/v2/analysis/lang/cjk"
_ "github.com/blevesearch/bleve/v2/analysis/lang/ckb"
_ "github.com/blevesearch/bleve/v2/analysis/lang/da"
_ "github.com/blevesearch/bleve/v2/analysis/lang/de"
_ "github.com/blevesearch/bleve/v2/analysis/lang/es"
_ "github.com/blevesearch/bleve/v2/analysis/lang/fi"
_ "github.com/blevesearch/bleve/v2/analysis/lang/fr"
_ "github.com/blevesearch/bleve/v2/analysis/lang/hi"
_ "github.com/blevesearch/bleve/v2/analysis/lang/hu"
_ "github.com/blevesearch/bleve/v2/analysis/lang/it"
_ "github.com/blevesearch/bleve/v2/analysis/lang/nl"
_ "github.com/blevesearch/bleve/v2/analysis/lang/no"
_ "github.com/blevesearch/bleve/v2/analysis/lang/pt"
_ "github.com/blevesearch/bleve/v2/analysis/lang/ro"
_ "github.com/blevesearch/bleve/v2/analysis/lang/ru"
_ "github.com/blevesearch/bleve/v2/analysis/lang/sv"
_ "github.com/blevesearch/bleve/v2/analysis/lang/tr"
_ "github.com/blevesearch/bleve/v2/analysis/token/porter"
"github.com/golang/glog"
)

Expand Down
2 changes: 1 addition & 1 deletion tok/stemmers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package tok
import (
"testing"

"github.com/blevesearch/bleve/analysis"
"github.com/blevesearch/bleve/v2/analysis"
"github.com/stretchr/testify/require"
)

Expand Down
58 changes: 29 additions & 29 deletions tok/stopwords.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,35 @@
package tok

import (
"github.com/blevesearch/bleve/analysis"
_ "github.com/blevesearch/bleve/analysis/lang/ar" // Needed for bleve language support.
_ "github.com/blevesearch/bleve/analysis/lang/bg"
_ "github.com/blevesearch/bleve/analysis/lang/ca"
_ "github.com/blevesearch/bleve/analysis/lang/ckb"
_ "github.com/blevesearch/bleve/analysis/lang/cs"
_ "github.com/blevesearch/bleve/analysis/lang/da"
_ "github.com/blevesearch/bleve/analysis/lang/de"
_ "github.com/blevesearch/bleve/analysis/lang/el"
_ "github.com/blevesearch/bleve/analysis/lang/en"
_ "github.com/blevesearch/bleve/analysis/lang/es"
_ "github.com/blevesearch/bleve/analysis/lang/eu"
_ "github.com/blevesearch/bleve/analysis/lang/fa"
_ "github.com/blevesearch/bleve/analysis/lang/fi"
_ "github.com/blevesearch/bleve/analysis/lang/fr"
_ "github.com/blevesearch/bleve/analysis/lang/ga"
_ "github.com/blevesearch/bleve/analysis/lang/gl"
_ "github.com/blevesearch/bleve/analysis/lang/hi"
_ "github.com/blevesearch/bleve/analysis/lang/hu"
_ "github.com/blevesearch/bleve/analysis/lang/hy"
_ "github.com/blevesearch/bleve/analysis/lang/id"
_ "github.com/blevesearch/bleve/analysis/lang/it"
_ "github.com/blevesearch/bleve/analysis/lang/nl"
_ "github.com/blevesearch/bleve/analysis/lang/no"
_ "github.com/blevesearch/bleve/analysis/lang/pt"
_ "github.com/blevesearch/bleve/analysis/lang/ro"
_ "github.com/blevesearch/bleve/analysis/lang/ru"
_ "github.com/blevesearch/bleve/analysis/lang/sv"
_ "github.com/blevesearch/bleve/analysis/lang/tr"
"github.com/blevesearch/bleve/v2/analysis"
_ "github.com/blevesearch/bleve/v2/analysis/lang/ar" // Needed for bleve language support.
_ "github.com/blevesearch/bleve/v2/analysis/lang/bg"
_ "github.com/blevesearch/bleve/v2/analysis/lang/ca"
_ "github.com/blevesearch/bleve/v2/analysis/lang/ckb"
_ "github.com/blevesearch/bleve/v2/analysis/lang/cs"
_ "github.com/blevesearch/bleve/v2/analysis/lang/da"
_ "github.com/blevesearch/bleve/v2/analysis/lang/de"
_ "github.com/blevesearch/bleve/v2/analysis/lang/el"
_ "github.com/blevesearch/bleve/v2/analysis/lang/en"
_ "github.com/blevesearch/bleve/v2/analysis/lang/es"
_ "github.com/blevesearch/bleve/v2/analysis/lang/eu"
_ "github.com/blevesearch/bleve/v2/analysis/lang/fa"
_ "github.com/blevesearch/bleve/v2/analysis/lang/fi"
_ "github.com/blevesearch/bleve/v2/analysis/lang/fr"
_ "github.com/blevesearch/bleve/v2/analysis/lang/ga"
_ "github.com/blevesearch/bleve/v2/analysis/lang/gl"
_ "github.com/blevesearch/bleve/v2/analysis/lang/hi"
_ "github.com/blevesearch/bleve/v2/analysis/lang/hu"
_ "github.com/blevesearch/bleve/v2/analysis/lang/hy"
_ "github.com/blevesearch/bleve/v2/analysis/lang/id"
_ "github.com/blevesearch/bleve/v2/analysis/lang/it"
_ "github.com/blevesearch/bleve/v2/analysis/lang/nl"
_ "github.com/blevesearch/bleve/v2/analysis/lang/no"
_ "github.com/blevesearch/bleve/v2/analysis/lang/pt"
_ "github.com/blevesearch/bleve/v2/analysis/lang/ro"
_ "github.com/blevesearch/bleve/v2/analysis/lang/ru"
_ "github.com/blevesearch/bleve/v2/analysis/lang/sv"
_ "github.com/blevesearch/bleve/v2/analysis/lang/tr"
"github.com/golang/glog"
)

Expand Down
2 changes: 1 addition & 1 deletion tok/stopwords_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package tok
import (
"testing"

"github.com/blevesearch/bleve/analysis"
"github.com/blevesearch/bleve/v2/analysis"
"github.com/stretchr/testify/require"
)

Expand Down

0 comments on commit 3fb8185

Please sign in to comment.