mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-29 06:00:03 +02:00
Upgrade bleve from v2.0.6 to v2.3.0 (#18132)
This commit is contained in:
parent
1a4e2bfcd1
commit
25a290e320
70 changed files with 1283 additions and 660 deletions
24
vendor/github.com/RoaringBitmap/roaring/roaring.go
generated
vendored
24
vendor/github.com/RoaringBitmap/roaring/roaring.go
generated
vendored
|
@ -1552,3 +1552,27 @@ func (rb *Bitmap) Stats() Statistics {
|
|||
}
|
||||
return stats
|
||||
}
|
||||
|
||||
func (rb *Bitmap) checkValidity() bool {
|
||||
for _, c := range rb.highlowcontainer.containers {
|
||||
|
||||
switch c.(type) {
|
||||
case *arrayContainer:
|
||||
if c.getCardinality() > arrayDefaultMaxSize {
|
||||
fmt.Println("Array containers are limited to size ", arrayDefaultMaxSize)
|
||||
return false
|
||||
}
|
||||
case *bitmapContainer:
|
||||
if c.getCardinality() <= arrayDefaultMaxSize {
|
||||
fmt.Println("Bitmaps would be more concise as an array!")
|
||||
return false
|
||||
}
|
||||
case *runContainer16:
|
||||
if c.getSizeInBytes() > minOfInt(bitmapContainerSizeInBytes(), arrayContainerSizeInBytes(c.getCardinality())) {
|
||||
fmt.Println("Inefficient run container!")
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue