[MM-20979] Add first implementation of the Bleve search engine (#14562)

* [MM-20979] Add first implementation of the Bleve search engine

* Fix i18n

* Migrate searchengine utils tests

* Fix linter

* Don't add allTermsQ if both termQueries and notTermQueries are empty

* Fix test that should work if user is system admin

* Modify naming according to review comments

* Abstract getIndexDir function

* Extracting bleve engine name as a constant

* Merge both Indexer interfaces into one

* Add worker stopped message

* Allow worker to be started/stopped with config change

* Use constants for index names

* Modify test order

* Fix linter

* Trying to unlock the CI
Этот коммит содержится в:
Miguel de la Cruz
2020-05-20 01:29:55 +02:00
коммит произвёл GitHub
родитель 8d0343d2eb
Коммит 0154b8059b
564 изменённых файлов: 287569 добавлений и 762 удалений

106
vendor/modules.txt поставляемый
Просмотреть файл

@@ -1,6 +1,9 @@
# github.com/Masterminds/squirrel v1.2.0
## explicit
github.com/Masterminds/squirrel
# github.com/RoaringBitmap/roaring v0.4.23
## explicit
github.com/RoaringBitmap/roaring
# github.com/armon/go-metrics v0.3.0
## explicit
github.com/armon/go-metrics
@@ -15,6 +18,58 @@ github.com/beorn7/perks/quantile
# github.com/blang/semver v3.5.1+incompatible
## explicit
github.com/blang/semver
# github.com/blevesearch/bleve v1.0.7
## explicit
github.com/blevesearch/bleve
github.com/blevesearch/bleve/analysis
github.com/blevesearch/bleve/analysis/analyzer/keyword
github.com/blevesearch/bleve/analysis/analyzer/standard
github.com/blevesearch/bleve/analysis/datetime/flexible
github.com/blevesearch/bleve/analysis/datetime/optional
github.com/blevesearch/bleve/analysis/lang/en
github.com/blevesearch/bleve/analysis/token/lowercase
github.com/blevesearch/bleve/analysis/token/porter
github.com/blevesearch/bleve/analysis/token/stop
github.com/blevesearch/bleve/analysis/tokenizer/single
github.com/blevesearch/bleve/analysis/tokenizer/unicode
github.com/blevesearch/bleve/document
github.com/blevesearch/bleve/geo
github.com/blevesearch/bleve/index
github.com/blevesearch/bleve/index/scorch
github.com/blevesearch/bleve/index/scorch/mergeplan
github.com/blevesearch/bleve/index/scorch/segment
github.com/blevesearch/bleve/index/store
github.com/blevesearch/bleve/index/store/boltdb
github.com/blevesearch/bleve/index/store/gtreap
github.com/blevesearch/bleve/index/upsidedown
github.com/blevesearch/bleve/mapping
github.com/blevesearch/bleve/numeric
github.com/blevesearch/bleve/registry
github.com/blevesearch/bleve/search
github.com/blevesearch/bleve/search/collector
github.com/blevesearch/bleve/search/facet
github.com/blevesearch/bleve/search/highlight
github.com/blevesearch/bleve/search/highlight/format/html
github.com/blevesearch/bleve/search/highlight/fragmenter/simple
github.com/blevesearch/bleve/search/highlight/highlighter/html
github.com/blevesearch/bleve/search/highlight/highlighter/simple
github.com/blevesearch/bleve/search/query
github.com/blevesearch/bleve/search/scorer
github.com/blevesearch/bleve/search/searcher
github.com/blevesearch/bleve/size
# github.com/blevesearch/go-porterstemmer v1.0.3
github.com/blevesearch/go-porterstemmer
# github.com/blevesearch/mmap-go v1.0.2
github.com/blevesearch/mmap-go
# github.com/blevesearch/segment v0.9.0
github.com/blevesearch/segment
# github.com/blevesearch/snowballstem v0.9.0
github.com/blevesearch/snowballstem
github.com/blevesearch/snowballstem/english
# github.com/blevesearch/zap/v11 v11.0.7
github.com/blevesearch/zap/v11
# github.com/blevesearch/zap/v12 v12.0.7
github.com/blevesearch/zap/v12
# github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869
## explicit
# github.com/cespare/xxhash/v2 v2.1.1
@@ -24,6 +79,17 @@ github.com/cespare/xxhash/v2
# github.com/corpix/uarand v0.1.1
## explicit
github.com/corpix/uarand
# github.com/couchbase/vellum v1.0.1
github.com/couchbase/vellum
github.com/couchbase/vellum/levenshtein
github.com/couchbase/vellum/regexp
github.com/couchbase/vellum/utf8
# github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d
## explicit
# github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548
## explicit
# github.com/cznic/strutil v0.0.0-20181122101858-275e90344537
## explicit
# github.com/davecgh/go-spew v1.1.1
github.com/davecgh/go-spew/spew
# github.com/dgryski/dgoogauth v0.0.0-20190221195224-5a805980a5f3
@@ -35,6 +101,12 @@ github.com/disintegration/imaging
# github.com/dyatlov/go-opengraph v0.0.0-20180429202543-816b6608b3c8
## explicit
github.com/dyatlov/go-opengraph/opengraph
# github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c
## explicit
# github.com/facebookgo/stack v0.0.0-20160209184415-751773369052
## explicit
# github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4
## explicit
# github.com/fatih/color v1.9.0
## explicit
github.com/fatih/color
@@ -46,6 +118,9 @@ github.com/francoispqt/gojay
# github.com/fsnotify/fsnotify v1.4.9
## explicit
github.com/fsnotify/fsnotify
# github.com/glycerine/go-unsnap-stream v0.0.0-20190901134440-81cf024a9e0a
## explicit
github.com/glycerine/go-unsnap-stream
# github.com/go-asn1-ber/asn1-ber v1.4.1
## explicit
github.com/go-asn1-ber/asn1-ber
@@ -59,7 +134,7 @@ github.com/go-sql-driver/mysql
github.com/golang/freetype
github.com/golang/freetype/raster
github.com/golang/freetype/truetype
# github.com/golang/protobuf v1.4.0
# github.com/golang/protobuf v1.4.2
## explicit
github.com/golang/protobuf/proto
github.com/golang/protobuf/protoc-gen-go/descriptor
@@ -68,13 +143,13 @@ github.com/golang/protobuf/ptypes/any
github.com/golang/protobuf/ptypes/duration
github.com/golang/protobuf/ptypes/empty
github.com/golang/protobuf/ptypes/timestamp
# github.com/golang/snappy v0.0.1
github.com/golang/snappy
# github.com/google/btree v1.0.0
github.com/google/btree
# github.com/google/uuid v1.1.1
## explicit
github.com/google/uuid
# github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c
## explicit
# github.com/gorilla/handlers v1.4.2
## explicit
github.com/gorilla/handlers
@@ -148,11 +223,14 @@ github.com/inconshreveable/mousetrap
# github.com/jaytaylor/html2text v0.0.0-20200412013138-3577fbdbcff7
## explicit
github.com/jaytaylor/html2text
# github.com/jmhodges/levigo v1.0.0
## explicit
# github.com/jmoiron/sqlx v1.2.0
## explicit
github.com/jmoiron/sqlx
github.com/jmoiron/sqlx/reflectx
# github.com/jonboulle/clockwork v0.1.0
## explicit
github.com/jonboulle/clockwork
# github.com/json-iterator/go v1.1.9
github.com/json-iterator/go
@@ -243,6 +321,8 @@ github.com/mkraft/gziphandler
github.com/modern-go/concurrent
# github.com/modern-go/reflect2 v1.0.1
github.com/modern-go/reflect2
# github.com/mschoch/smat v0.2.0
github.com/mschoch/smat
# github.com/muesli/smartcrop v0.3.0
## explicit
github.com/muesli/smartcrop
@@ -271,6 +351,8 @@ github.com/pborman/uuid
# github.com/pelletier/go-toml v1.7.0
## explicit
github.com/pelletier/go-toml
# github.com/philhofer/fwd v1.0.0
github.com/philhofer/fwd
# github.com/pkg/errors v0.9.1
## explicit
github.com/pkg/errors
@@ -282,6 +364,7 @@ github.com/prometheus/client_golang/prometheus
github.com/prometheus/client_golang/prometheus/internal
github.com/prometheus/client_golang/prometheus/promhttp
# github.com/prometheus/client_model v0.2.0
## explicit
github.com/prometheus/client_model/go
# github.com/prometheus/common v0.9.1
github.com/prometheus/common/expfmt
@@ -292,6 +375,8 @@ github.com/prometheus/common/model
github.com/prometheus/procfs
github.com/prometheus/procfs/internal/fs
github.com/prometheus/procfs/internal/util
# github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237
## explicit
# github.com/rs/cors v1.7.0
## explicit
github.com/rs/cors
@@ -341,6 +426,8 @@ github.com/spf13/pflag
# github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf
## explicit
github.com/ssor/bom
# github.com/steveyen/gtreap v0.1.0
github.com/steveyen/gtreap
# github.com/stretchr/objx v0.2.0
## explicit
github.com/stretchr/objx
@@ -350,10 +437,15 @@ github.com/stretchr/testify/assert
github.com/stretchr/testify/mock
github.com/stretchr/testify/require
github.com/stretchr/testify/suite
# github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c
## explicit
# github.com/throttled/throttled v2.2.4+incompatible
## explicit
github.com/throttled/throttled
github.com/throttled/throttled/store/memstore
# github.com/tinylib/msgp v1.1.2
## explicit
github.com/tinylib/msgp/msgp
# github.com/tylerb/graceful v1.2.15
## explicit
github.com/tylerb/graceful
@@ -396,11 +488,15 @@ github.com/wiggin77/merror
# github.com/wiggin77/srslog v1.0.1
## explicit
github.com/wiggin77/srslog
# github.com/willf/bitset v1.1.10
github.com/willf/bitset
# github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c
## explicit
github.com/xtgo/uuid
# github.com/ziutek/mymysql v1.5.4
## explicit
# go.etcd.io/bbolt v1.3.4
go.etcd.io/bbolt
# go.uber.org/atomic v1.6.0
go.uber.org/atomic
# go.uber.org/multierr v1.5.0
@@ -467,7 +563,7 @@ golang.org/x/net/ipv4
golang.org/x/net/ipv6
golang.org/x/net/publicsuffix
golang.org/x/net/trace
# golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3
# golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9
## explicit
golang.org/x/sys/cpu
golang.org/x/sys/internal/unsafeheader
@@ -563,7 +659,7 @@ google.golang.org/grpc/serviceconfig
google.golang.org/grpc/stats
google.golang.org/grpc/status
google.golang.org/grpc/tap
# google.golang.org/protobuf v1.21.0
# google.golang.org/protobuf v1.23.0
google.golang.org/protobuf/encoding/prototext
google.golang.org/protobuf/encoding/protowire
google.golang.org/protobuf/internal/descfmt