Upgrade bleve from v2.0.6 to v2.3.0 (#18132)

This commit is contained in:
Lunny Xiao authored and GitHub committed 2022-01-01 16:26:27 +08:00
1 parent 1a4e2bfcd1
commit 25a290e320
70 files changed
+1283 -660

No files matched your search

+24
View File
@@ -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
}