mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-03 06:17:00 +09:00
Upgrade bleve from v2.0.6 to v2.3.0 (#18132)
This commit is contained in:
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
|
||||
}
|
Reference in New Issue
Block a user