forked from forgejo/forgejo
go1.16 (#14783)
This commit is contained in:
parent
030646eea4
commit
47f6a4ec3f
947 changed files with 26119 additions and 7062 deletions
14
vendor/github.com/blevesearch/bleve/v2/go.mod
generated
vendored
14
vendor/github.com/blevesearch/bleve/v2/go.mod
generated
vendored
|
@ -6,17 +6,17 @@ require (
|
|||
github.com/RoaringBitmap/roaring v0.4.23
|
||||
github.com/blevesearch/bleve_index_api v1.0.0
|
||||
github.com/blevesearch/go-porterstemmer v1.0.3
|
||||
github.com/blevesearch/scorch_segment_api v1.0.0
|
||||
github.com/blevesearch/scorch_segment_api/v2 v2.0.1
|
||||
github.com/blevesearch/segment v0.9.0
|
||||
github.com/blevesearch/snowballstem v0.9.0
|
||||
github.com/blevesearch/upsidedown_store_api v1.0.1
|
||||
github.com/blevesearch/zapx/v11 v11.1.10
|
||||
github.com/blevesearch/zapx/v12 v12.1.10
|
||||
github.com/blevesearch/zapx/v13 v13.1.10
|
||||
github.com/blevesearch/zapx/v14 v14.1.10
|
||||
github.com/blevesearch/zapx/v15 v15.1.10
|
||||
github.com/blevesearch/vellum v1.0.3
|
||||
github.com/blevesearch/zapx/v11 v11.2.0
|
||||
github.com/blevesearch/zapx/v12 v12.2.0
|
||||
github.com/blevesearch/zapx/v13 v13.2.0
|
||||
github.com/blevesearch/zapx/v14 v14.2.0
|
||||
github.com/blevesearch/zapx/v15 v15.2.0
|
||||
github.com/couchbase/moss v0.1.0
|
||||
github.com/couchbase/vellum v1.0.2
|
||||
github.com/golang/protobuf v1.3.2
|
||||
github.com/kljensen/snowball v0.6.0
|
||||
github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563
|
||||
|
|
28
vendor/github.com/blevesearch/bleve/v2/go.sum
generated
vendored
28
vendor/github.com/blevesearch/bleve/v2/go.sum
generated
vendored
|
@ -8,24 +8,26 @@ github.com/blevesearch/go-porterstemmer v1.0.3 h1:GtmsqID0aZdCSNiY8SkuPJ12pD4jI+
|
|||
github.com/blevesearch/go-porterstemmer v1.0.3/go.mod h1:angGc5Ht+k2xhJdZi511LtmxuEf0OVpvUUNrwmM1P7M=
|
||||
github.com/blevesearch/mmap-go v1.0.2 h1:JtMHb+FgQCTTYIhtMvimw15dJwu1Y5lrZDMOFXVWPk0=
|
||||
github.com/blevesearch/mmap-go v1.0.2/go.mod h1:ol2qBqYaOUsGdm7aRMRrYGgPvnwLe6Y+7LMvAB5IbSA=
|
||||
github.com/blevesearch/scorch_segment_api v1.0.0 h1:BUkCPWDg2gimTEyVDXf85I2buqqt4lh28uaVMiJsIYk=
|
||||
github.com/blevesearch/scorch_segment_api v1.0.0/go.mod h1:KgRYmlfYC27NeM6cXOHx8LBgq7jn0atpV8mVWoBKBng=
|
||||
github.com/blevesearch/scorch_segment_api/v2 v2.0.1 h1:fd+hPtZ8GsbqPK1HslGp7Vhoik4arZteA/IsCEgOisw=
|
||||
github.com/blevesearch/scorch_segment_api/v2 v2.0.1/go.mod h1:lq7yK2jQy1yQjtjTfU931aVqz7pYxEudHaDwOt1tXfU=
|
||||
github.com/blevesearch/segment v0.9.0 h1:5lG7yBCx98or7gK2cHMKPukPZ/31Kag7nONpoBt22Ac=
|
||||
github.com/blevesearch/segment v0.9.0/go.mod h1:9PfHYUdQCgHktBgvtUOF4x+pc4/l8rdH0u5spnW85UQ=
|
||||
github.com/blevesearch/snowballstem v0.9.0 h1:lMQ189YspGP6sXvZQ4WZ+MLawfV8wOmPoD/iWeNXm8s=
|
||||
github.com/blevesearch/snowballstem v0.9.0/go.mod h1:PivSj3JMc8WuaFkTSRDW2SlrulNWPl4ABg1tC/hlgLs=
|
||||
github.com/blevesearch/upsidedown_store_api v1.0.1 h1:1SYRwyoFLwG3sj0ed89RLtM15amfX2pXlYbFOnF8zNU=
|
||||
github.com/blevesearch/upsidedown_store_api v1.0.1/go.mod h1:MQDVGpHZrpe3Uy26zJBf/a8h0FZY6xJbthIMm8myH2Q=
|
||||
github.com/blevesearch/zapx/v11 v11.1.10 h1:8Eo3rXiHsVSP9Sk+4StrrwLrj9vyulhMVPmxTf8ZuDg=
|
||||
github.com/blevesearch/zapx/v11 v11.1.10/go.mod h1:DTjbcBqrr/Uo82UBilDC8lEew42gN/OcIyiTNFtSijc=
|
||||
github.com/blevesearch/zapx/v12 v12.1.10 h1:sqR+/0Z4dSTovApRqLA1HnilMtQer7a4UvPrNmPzlTM=
|
||||
github.com/blevesearch/zapx/v12 v12.1.10/go.mod h1:14NmKnPrnKAIyiEJM566k/Jk+FQpuiflT5d3uaaK3MI=
|
||||
github.com/blevesearch/zapx/v13 v13.1.10 h1:zCneEVRJDXwtDfSwh+33Dxguliv192vCK283zdGH4Sw=
|
||||
github.com/blevesearch/zapx/v13 v13.1.10/go.mod h1:YsVY6YGpTEAlJOMjdL7EsdBLvjWd8kPa2gwJDNpqLJo=
|
||||
github.com/blevesearch/zapx/v14 v14.1.10 h1:nD0vw2jxKogJFfA5WyoS4wNwZlVby3Aq8aW7CZi6YIw=
|
||||
github.com/blevesearch/zapx/v14 v14.1.10/go.mod h1:hsULl5eJSxs5NEfBsmeT9qrqdCP+/ecpVZKt60M4V64=
|
||||
github.com/blevesearch/zapx/v15 v15.1.10 h1:kZR3b9jO9l6s2B5UHI+1N1llLzJ4nYikkXQTMrDl1vQ=
|
||||
github.com/blevesearch/zapx/v15 v15.1.10/go.mod h1:4ypq25bwtSQKzwEF1UERyIhmGTbMT3brY/n4NC5gRnM=
|
||||
github.com/blevesearch/vellum v1.0.3 h1:U86G41A7CtXNzzpIJHM8lSTUqz1Mp8U870TkcdCzZc8=
|
||||
github.com/blevesearch/vellum v1.0.3/go.mod h1:2u5ax02KeDuNWu4/C+hVQMD6uLN4txH1JbtpaDNLJRo=
|
||||
github.com/blevesearch/zapx/v11 v11.2.0 h1:GBkCJYsyj3eIU4+aiLPxoMz1PYvDbQZl/oXHIBZIP60=
|
||||
github.com/blevesearch/zapx/v11 v11.2.0/go.mod h1:gN/a0alGw1FZt/YGTo1G6Z6XpDkeOfujX5exY9sCQQM=
|
||||
github.com/blevesearch/zapx/v12 v12.2.0 h1:dyRcSoZVO1jktL4UpGkCEF1AYa3xhKPirh4/N+Va+Ww=
|
||||
github.com/blevesearch/zapx/v12 v12.2.0/go.mod h1:fdjwvCwWWwJW/EYTYGtAp3gBA0geCYGLcVTtJEZnY6A=
|
||||
github.com/blevesearch/zapx/v13 v13.2.0 h1:mUqbaqQABp8nBE4t4q2qMyHCCq4sykoV8r7aJk4ih3s=
|
||||
github.com/blevesearch/zapx/v13 v13.2.0/go.mod h1:o5rAy/lRS5JpAbITdrOHBS/TugWYbkcYZTz6VfEinAQ=
|
||||
github.com/blevesearch/zapx/v14 v14.2.0 h1:UsfRqvM9RJxKNKrkR1U7aYc1cv9MWx719fsAjbF6joI=
|
||||
github.com/blevesearch/zapx/v14 v14.2.0/go.mod h1:GNgZusc1p4ot040cBQMRGEZobvwjCquiEKYh1xLFK9g=
|
||||
github.com/blevesearch/zapx/v15 v15.2.0 h1:ZpibwcrrOaeslkOw3sJ7npP7KDgRHI/DkACjKTqFwyM=
|
||||
github.com/blevesearch/zapx/v15 v15.2.0/go.mod h1:MmQceLpWfME4n1WrBFIwplhWmaQbQqLQARpaKUEOs/A=
|
||||
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
|
||||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
|
@ -33,8 +35,6 @@ github.com/couchbase/ghistogram v0.1.0 h1:b95QcQTCzjTUocDXp/uMgSNQi8oj1tGwnJ4bOD
|
|||
github.com/couchbase/ghistogram v0.1.0/go.mod h1:s1Jhy76zqfEecpNWJfWUiKZookAFaiGOEoyzgHt9i7k=
|
||||
github.com/couchbase/moss v0.1.0 h1:HCL+xxHUwmOaL44kMM/gU08OW6QGCui1WVFO58bjhNI=
|
||||
github.com/couchbase/moss v0.1.0/go.mod h1:9MaHIaRuy9pvLPUJxB8sh8OrLfyDczECVL37grCIubs=
|
||||
github.com/couchbase/vellum v1.0.2 h1:BrbP0NKiyDdndMPec8Jjhy0U47CZ0Lgx3xUC2r9rZqw=
|
||||
github.com/couchbase/vellum v1.0.2/go.mod h1:FcwrEivFpNi24R3jLOs3n+fs5RnuQnQqCLBJ1uAg1W4=
|
||||
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
|
|
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/builder.go
generated
vendored
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/builder.go
generated
vendored
|
@ -22,7 +22,7 @@ import (
|
|||
|
||||
"github.com/RoaringBitmap/roaring"
|
||||
index "github.com/blevesearch/bleve_index_api"
|
||||
segment "github.com/blevesearch/scorch_segment_api"
|
||||
segment "github.com/blevesearch/scorch_segment_api/v2"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
)
|
||||
|
||||
|
|
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/empty.go
generated
vendored
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/empty.go
generated
vendored
|
@ -14,7 +14,7 @@
|
|||
|
||||
package scorch
|
||||
|
||||
import segment "github.com/blevesearch/scorch_segment_api"
|
||||
import segment "github.com/blevesearch/scorch_segment_api/v2"
|
||||
|
||||
type emptyPostingsIterator struct{}
|
||||
|
||||
|
|
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/introducer.go
generated
vendored
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/introducer.go
generated
vendored
|
@ -20,7 +20,7 @@ import (
|
|||
|
||||
"github.com/RoaringBitmap/roaring"
|
||||
index "github.com/blevesearch/bleve_index_api"
|
||||
segment "github.com/blevesearch/scorch_segment_api"
|
||||
segment "github.com/blevesearch/scorch_segment_api/v2"
|
||||
)
|
||||
|
||||
type segmentIntroduction struct {
|
||||
|
|
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/merge.go
generated
vendored
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/merge.go
generated
vendored
|
@ -25,7 +25,7 @@ import (
|
|||
|
||||
"github.com/RoaringBitmap/roaring"
|
||||
"github.com/blevesearch/bleve/v2/index/scorch/mergeplan"
|
||||
segment "github.com/blevesearch/scorch_segment_api"
|
||||
segment "github.com/blevesearch/scorch_segment_api/v2"
|
||||
)
|
||||
|
||||
func (s *Scorch) mergerLoop() {
|
||||
|
|
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/optimize.go
generated
vendored
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/optimize.go
generated
vendored
|
@ -18,7 +18,7 @@ import (
|
|||
"fmt"
|
||||
"github.com/RoaringBitmap/roaring"
|
||||
index "github.com/blevesearch/bleve_index_api"
|
||||
segment "github.com/blevesearch/scorch_segment_api"
|
||||
segment "github.com/blevesearch/scorch_segment_api/v2"
|
||||
"sync/atomic"
|
||||
)
|
||||
|
||||
|
|
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/persister.go
generated
vendored
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/persister.go
generated
vendored
|
@ -31,7 +31,7 @@ import (
|
|||
|
||||
"github.com/RoaringBitmap/roaring"
|
||||
index "github.com/blevesearch/bleve_index_api"
|
||||
segment "github.com/blevesearch/scorch_segment_api"
|
||||
segment "github.com/blevesearch/scorch_segment_api/v2"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
)
|
||||
|
||||
|
|
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/regexp.go
generated
vendored
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/regexp.go
generated
vendored
|
@ -17,7 +17,7 @@ package scorch
|
|||
import (
|
||||
"regexp/syntax"
|
||||
|
||||
"github.com/couchbase/vellum/regexp"
|
||||
"github.com/blevesearch/vellum/regexp"
|
||||
)
|
||||
|
||||
func parseRegexp(pattern string) (a *regexp.Regexp, prefixBeg, prefixEnd []byte, err error) {
|
||||
|
|
19
vendor/github.com/blevesearch/bleve/v2/index/scorch/scorch.go
generated
vendored
19
vendor/github.com/blevesearch/bleve/v2/index/scorch/scorch.go
generated
vendored
|
@ -26,7 +26,7 @@ import (
|
|||
"github.com/RoaringBitmap/roaring"
|
||||
"github.com/blevesearch/bleve/v2/registry"
|
||||
index "github.com/blevesearch/bleve_index_api"
|
||||
segment "github.com/blevesearch/scorch_segment_api"
|
||||
segment "github.com/blevesearch/scorch_segment_api/v2"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
)
|
||||
|
||||
|
@ -199,11 +199,9 @@ func (s *Scorch) openBolt() error {
|
|||
s.unsafeBatch = true
|
||||
}
|
||||
|
||||
var rootBoltOpt *bolt.Options
|
||||
var rootBoltOpt = *bolt.DefaultOptions
|
||||
if s.readOnly {
|
||||
rootBoltOpt = &bolt.Options{
|
||||
ReadOnly: true,
|
||||
}
|
||||
rootBoltOpt.ReadOnly = true
|
||||
} else {
|
||||
if s.path != "" {
|
||||
err := os.MkdirAll(s.path, 0700)
|
||||
|
@ -213,10 +211,19 @@ func (s *Scorch) openBolt() error {
|
|||
}
|
||||
}
|
||||
|
||||
if boltTimeoutStr, ok := s.config["bolt_timeout"].(string); ok {
|
||||
var err error
|
||||
boltTimeout, err := time.ParseDuration(boltTimeoutStr)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid duration specified for bolt_timeout: %v", err)
|
||||
}
|
||||
rootBoltOpt.Timeout = boltTimeout
|
||||
}
|
||||
|
||||
rootBoltPath := s.path + string(os.PathSeparator) + "root.bolt"
|
||||
var err error
|
||||
if s.path != "" {
|
||||
s.rootBolt, err = bolt.Open(rootBoltPath, 0600, rootBoltOpt)
|
||||
s.rootBolt, err = bolt.Open(rootBoltPath, 0600, &rootBoltOpt)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/segment_plugin.go
generated
vendored
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/segment_plugin.go
generated
vendored
|
@ -19,7 +19,7 @@ import (
|
|||
"github.com/RoaringBitmap/roaring"
|
||||
index "github.com/blevesearch/bleve_index_api"
|
||||
|
||||
segment "github.com/blevesearch/scorch_segment_api"
|
||||
segment "github.com/blevesearch/scorch_segment_api/v2"
|
||||
|
||||
zapv11 "github.com/blevesearch/zapx/v11"
|
||||
zapv12 "github.com/blevesearch/zapx/v12"
|
||||
|
|
6
vendor/github.com/blevesearch/bleve/v2/index/scorch/snapshot_index.go
generated
vendored
6
vendor/github.com/blevesearch/bleve/v2/index/scorch/snapshot_index.go
generated
vendored
|
@ -26,9 +26,9 @@ import (
|
|||
"github.com/RoaringBitmap/roaring"
|
||||
"github.com/blevesearch/bleve/v2/document"
|
||||
index "github.com/blevesearch/bleve_index_api"
|
||||
segment "github.com/blevesearch/scorch_segment_api"
|
||||
"github.com/couchbase/vellum"
|
||||
lev "github.com/couchbase/vellum/levenshtein"
|
||||
segment "github.com/blevesearch/scorch_segment_api/v2"
|
||||
"github.com/blevesearch/vellum"
|
||||
lev "github.com/blevesearch/vellum/levenshtein"
|
||||
)
|
||||
|
||||
// re usable, threadsafe levenshtein builders
|
||||
|
|
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/snapshot_index_dict.go
generated
vendored
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/snapshot_index_dict.go
generated
vendored
|
@ -18,7 +18,7 @@ import (
|
|||
"container/heap"
|
||||
|
||||
index "github.com/blevesearch/bleve_index_api"
|
||||
segment "github.com/blevesearch/scorch_segment_api"
|
||||
segment "github.com/blevesearch/scorch_segment_api/v2"
|
||||
)
|
||||
|
||||
type segmentDictCursor struct {
|
||||
|
|
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/snapshot_index_tfr.go
generated
vendored
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/snapshot_index_tfr.go
generated
vendored
|
@ -22,7 +22,7 @@ import (
|
|||
|
||||
"github.com/blevesearch/bleve/v2/size"
|
||||
index "github.com/blevesearch/bleve_index_api"
|
||||
segment "github.com/blevesearch/scorch_segment_api"
|
||||
segment "github.com/blevesearch/scorch_segment_api/v2"
|
||||
)
|
||||
|
||||
var reflectStaticSizeIndexSnapshotTermFieldReader int
|
||||
|
|
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/snapshot_segment.go
generated
vendored
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/snapshot_segment.go
generated
vendored
|
@ -22,7 +22,7 @@ import (
|
|||
"github.com/RoaringBitmap/roaring"
|
||||
"github.com/blevesearch/bleve/v2/size"
|
||||
index "github.com/blevesearch/bleve_index_api"
|
||||
segment "github.com/blevesearch/scorch_segment_api"
|
||||
segment "github.com/blevesearch/scorch_segment_api/v2"
|
||||
)
|
||||
|
||||
var TermSeparator byte = 0xff
|
||||
|
|
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/unadorned.go
generated
vendored
2
vendor/github.com/blevesearch/bleve/v2/index/scorch/unadorned.go
generated
vendored
|
@ -16,7 +16,7 @@ package scorch
|
|||
|
||||
import (
|
||||
"github.com/RoaringBitmap/roaring"
|
||||
segment "github.com/blevesearch/scorch_segment_api"
|
||||
segment "github.com/blevesearch/scorch_segment_api/v2"
|
||||
"math"
|
||||
"reflect"
|
||||
)
|
||||
|
|
8
vendor/github.com/blevesearch/bleve/v2/search.go
generated
vendored
8
vendor/github.com/blevesearch/bleve/v2/search.go
generated
vendored
|
@ -600,12 +600,14 @@ func MemoryNeededForSearchResult(req *SearchRequest) uint64 {
|
|||
estimate += len(req.Facets) * fr.Size()
|
||||
}
|
||||
|
||||
// highlighting, store
|
||||
// overhead from fields, highlighting
|
||||
var d document.Document
|
||||
if len(req.Fields) > 0 || req.Highlight != nil {
|
||||
for i := 0; i < (req.Size + req.From); i++ {
|
||||
estimate += (req.Size + req.From) * d.Size()
|
||||
numDocsApplicable := req.Size
|
||||
if numDocsApplicable > collector.PreAllocSizeSkipCap {
|
||||
numDocsApplicable = collector.PreAllocSizeSkipCap
|
||||
}
|
||||
estimate += numDocsApplicable * d.Size()
|
||||
}
|
||||
|
||||
return uint64(estimate)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue