Skip to content

Commit

Permalink
Upgrade to RoaringBitmap/roaring's v2.4.4 (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavdangeti authored Feb 5, 2025
1 parent add85a7 commit 2911740
Show file tree
Hide file tree
Showing 23 changed files with 36 additions and 33 deletions.
2 changes: 1 addition & 1 deletion cmd/zap/cmd/dict.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"fmt"
"math"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/v2"
"github.com/blevesearch/vellum"
zap "github.com/blevesearch/zapx/v16"
"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cmd/zap/cmd/explore.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"fmt"
"math"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/v2"
"github.com/blevesearch/vellum"
zap "github.com/blevesearch/zapx/v16"
"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cmd/zap/cmd/synonym.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"encoding/binary"
"fmt"

"github.com/RoaringBitmap/roaring/roaring64"
"github.com/RoaringBitmap/roaring/v2/roaring64"
"github.com/blevesearch/vellum"
"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion dict.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package zap
import (
"fmt"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/v2"
index "github.com/blevesearch/bleve_index_api"
segment "github.com/blevesearch/scorch_segment_api/v2"
"github.com/blevesearch/vellum"
Expand Down
2 changes: 1 addition & 1 deletion faiss_vector_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"sync/atomic"
"time"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/v2"
faiss "github.com/blevesearch/go-faiss"
)

Expand Down
4 changes: 2 additions & 2 deletions faiss_vector_posting.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"math"
"reflect"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/roaring64"
"github.com/RoaringBitmap/roaring/v2"
"github.com/RoaringBitmap/roaring/v2/roaring64"
faiss "github.com/blevesearch/go-faiss"
segment "github.com/blevesearch/scorch_segment_api/v2"
)
Expand Down
4 changes: 2 additions & 2 deletions faiss_vector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"os"
"testing"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/roaring64"
"github.com/RoaringBitmap/roaring/v2"
"github.com/RoaringBitmap/roaring/v2/roaring64"
index "github.com/blevesearch/bleve_index_api"
faiss "github.com/blevesearch/go-faiss"
segment "github.com/blevesearch/scorch_segment_api/v2"
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ module github.com/blevesearch/zapx/v16
go 1.21

require (
github.com/RoaringBitmap/roaring v1.9.3
github.com/RoaringBitmap/roaring/v2 v2.4.4
github.com/blevesearch/bleve_index_api v1.2.1
github.com/blevesearch/go-faiss v1.0.24
github.com/blevesearch/mmap-go v1.0.4
github.com/blevesearch/scorch_segment_api/v2 v2.3.1
github.com/blevesearch/scorch_segment_api/v2 v2.3.2
github.com/blevesearch/vellum v1.1.0
github.com/golang/snappy v0.0.4
github.com/spf13/cobra v1.7.0
Expand Down
11 changes: 7 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/RoaringBitmap/roaring v1.9.3 h1:t4EbC5qQwnisr5PrP9nt0IRhRTb9gMUgQF4t4S2OByM=
github.com/RoaringBitmap/roaring v1.9.3/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90=
github.com/RoaringBitmap/roaring/v2 v2.4.4 h1:a4k7LUbtIfERkheZ0Or/k5nNxnsnzmKiue+Ac1rljZA=
github.com/RoaringBitmap/roaring/v2 v2.4.4/go.mod h1:FiJcsfkGje/nZBZgCu0ZxCPOKD/hVXDS2dXi7/eUFE0=
github.com/bits-and-blooms/bitset v1.12.0 h1:U/q1fAF7xXRhFCrhROzIfffYnu+dlS38vCZtmFVPHmA=
github.com/bits-and-blooms/bitset v1.12.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
github.com/blevesearch/bleve_index_api v1.2.1 h1:IuXwLvmyp7I7+e0FOA68gcHHLfzSQ4AqQ8wVab5uxk0=
Expand All @@ -8,8 +8,8 @@ github.com/blevesearch/go-faiss v1.0.24 h1:K79IvKjoKHdi7FdiXEsAhxpMuns0x4fM0BO93
github.com/blevesearch/go-faiss v1.0.24/go.mod h1:OMGQwOaRRYxrmeNdMrXJPvVx8gBnvE5RYrr0BahNnkk=
github.com/blevesearch/mmap-go v1.0.4 h1:OVhDhT5B/M1HNPpYPBKIEJaD0F3Si+CrEKULGCDPWmc=
github.com/blevesearch/mmap-go v1.0.4/go.mod h1:EWmEAOmdAS9z/pi/+Toxu99DnsbhG1TIxUoRmJw/pSs=
github.com/blevesearch/scorch_segment_api/v2 v2.3.1 h1:jjexIzwOdBtC9MlUceNErYHepLvoKxTdA5atbeZSRWE=
github.com/blevesearch/scorch_segment_api/v2 v2.3.1/go.mod h1:Np3Y03rsemM5TsyFxQ3wy+tG97EcviLTbp2S5W0tpRY=
github.com/blevesearch/scorch_segment_api/v2 v2.3.2 h1:hvcBElgN+u0aRybfKPCFLjwiOPdT54J9PZVqZjJm170=
github.com/blevesearch/scorch_segment_api/v2 v2.3.2/go.mod h1:eDTO6kPkiiZRT1jH3UDuHXSYos/G+G8VN5xHG+BPLKM=
github.com/blevesearch/vellum v1.1.0 h1:CinkGyIsgVlYf8Y2LUQHvdelgXr6PYuvoDIajq6yR9w=
github.com/blevesearch/vellum v1.1.0/go.mod h1:QgwWryE8ThtNPxtgWJof5ndPfx0/YMBh+W2weHKPw8Y=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
Expand All @@ -18,6 +18,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM=
Expand All @@ -37,5 +39,6 @@ golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
2 changes: 1 addition & 1 deletion merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"os"
"sort"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/v2"
seg "github.com/blevesearch/scorch_segment_api/v2"
"github.com/golang/snappy"
)
Expand Down
2 changes: 1 addition & 1 deletion merge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"strings"
"testing"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/v2"
index "github.com/blevesearch/bleve_index_api"
seg "github.com/blevesearch/scorch_segment_api/v2"
)
Expand Down
2 changes: 1 addition & 1 deletion posting.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"math"
"reflect"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/v2"
segment "github.com/blevesearch/scorch_segment_api/v2"
)

Expand Down
2 changes: 1 addition & 1 deletion section.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package zap
import (
"sync"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/v2"
index "github.com/blevesearch/bleve_index_api"
)

Expand Down
2 changes: 1 addition & 1 deletion section_faiss_vector_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"sync/atomic"
"time"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/v2"
index "github.com/blevesearch/bleve_index_api"
faiss "github.com/blevesearch/go-faiss"
seg "github.com/blevesearch/scorch_segment_api/v2"
Expand Down
2 changes: 1 addition & 1 deletion section_inverted_text_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"sort"
"sync/atomic"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/v2"
index "github.com/blevesearch/bleve_index_api"
seg "github.com/blevesearch/scorch_segment_api/v2"
"github.com/blevesearch/vellum"
Expand Down
4 changes: 2 additions & 2 deletions section_synonym_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"math"
"sort"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/roaring64"
"github.com/RoaringBitmap/roaring/v2"
"github.com/RoaringBitmap/roaring/v2/roaring64"
index "github.com/blevesearch/bleve_index_api"
seg "github.com/blevesearch/scorch_segment_api/v2"
"github.com/blevesearch/vellum"
Expand Down
2 changes: 1 addition & 1 deletion segment.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"sync/atomic"
"unsafe"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/v2"
mmap "github.com/blevesearch/mmap-go"
segment "github.com/blevesearch/scorch_segment_api/v2"
"github.com/blevesearch/vellum"
Expand Down
2 changes: 1 addition & 1 deletion segment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"reflect"
"testing"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/v2"
segment "github.com/blevesearch/scorch_segment_api/v2"
)

Expand Down
4 changes: 2 additions & 2 deletions synonym_posting.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"fmt"
"reflect"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/roaring64"
"github.com/RoaringBitmap/roaring/v2"
"github.com/RoaringBitmap/roaring/v2/roaring64"
segment "github.com/blevesearch/scorch_segment_api/v2"
)

Expand Down
2 changes: 1 addition & 1 deletion thesaurus.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"bytes"
"fmt"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/v2"
index "github.com/blevesearch/bleve_index_api"
segment "github.com/blevesearch/scorch_segment_api/v2"
"github.com/blevesearch/vellum"
Expand Down
2 changes: 1 addition & 1 deletion thesaurus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

"errors"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/v2"
index "github.com/blevesearch/bleve_index_api"
segment "github.com/blevesearch/scorch_segment_api/v2"
)
Expand Down
2 changes: 1 addition & 1 deletion write.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"encoding/binary"
"io"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/v2"
)

// writes out the length of the roaring bitmap in bytes as varint
Expand Down
6 changes: 3 additions & 3 deletions write_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"math"
"testing"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/v2"
)

func TestRoaringSizes(t *testing.T) {
Expand All @@ -40,11 +40,11 @@ func TestRoaringSizes(t *testing.T) {
{[]uint32{0, 1}, 20, 20},
{[]uint32{0, 10000000}, 28, 28},

{[]uint32{0, 1, 2}, 22, 15},
{[]uint32{0, 1, 2}, 22, 22},
{[]uint32{0, 1, 20000000}, 30, 30},

{[]uint32{0, 1, 2, 3}, 24, 15},
{[]uint32{0, 1, 2, 30000000}, 32, 21},
{[]uint32{0, 1, 2, 30000000}, 32, 32},
}

for _, test := range tests {
Expand Down

0 comments on commit 2911740

Please sign in to comment.