From d4466713496b7a8c7841010714edf8bd8e4d9bd9 Mon Sep 17 00:00:00 2001 From: Likith B Date: Wed, 31 Jul 2024 11:53:31 +0530 Subject: [PATCH 1/4] MB-61640: Fuzzy Dynamic Scoring - Propagating edit distance from vellum --- dict.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dict.go b/dict.go index d06278fd..05d95745 100644 --- a/dict.go +++ b/dict.go @@ -165,6 +165,9 @@ func (i *DictionaryIterator) Next() (*index.DictEntry, error) { return nil, nil } term, postingsOffset := i.itr.Current() + if fitr, ok := i.itr.(vellum.FuzzyIterator); ok { + i.entry.EditDistance = fitr.Distance() + } i.entry.Term = string(term) if !i.omitCount { i.err = i.tmp.read(postingsOffset, i.d) From ebe578a38f470447e99c7ee19737f83ed31ec9a0 Mon Sep 17 00:00:00 2001 From: Abhinav Dangeti Date: Mon, 18 Nov 2024 11:29:21 -0700 Subject: [PATCH 2/4] Update bleve_index_api, wip: update vellum --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f70c2ac0..805a0143 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/RoaringBitmap/roaring v1.9.3 - github.com/blevesearch/bleve_index_api v1.1.12 + github.com/blevesearch/bleve_index_api v1.1.13 github.com/blevesearch/go-faiss v1.0.23 github.com/blevesearch/mmap-go v1.0.4 github.com/blevesearch/scorch_segment_api/v2 v2.2.16 diff --git a/go.sum b/go.sum index 410b4cf4..60627ab3 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ github.com/RoaringBitmap/roaring v1.9.3 h1:t4EbC5qQwnisr5PrP9nt0IRhRTb9gMUgQF4t4 github.com/RoaringBitmap/roaring v1.9.3/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90= 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.1.12 h1:P4bw9/G/5rulOF7SJ9l4FsDoo7UFJ+5kexNy1RXfegY= -github.com/blevesearch/bleve_index_api v1.1.12/go.mod h1:PbcwjIcRmjhGbkS/lJCpfgVSMROV6TRubGGAODaK1W8= +github.com/blevesearch/bleve_index_api v1.1.13 h1:+nrA6oRJr85aCPyqaeZtsruObwKojutfonHJin/BP48= +github.com/blevesearch/bleve_index_api v1.1.13/go.mod h1:PbcwjIcRmjhGbkS/lJCpfgVSMROV6TRubGGAODaK1W8= github.com/blevesearch/go-faiss v1.0.23 h1:Wmc5AFwDLKGl2L6mjLX1Da3vCL0EKa2uHHSorcIS1Uc= github.com/blevesearch/go-faiss v1.0.23/go.mod h1:OMGQwOaRRYxrmeNdMrXJPvVx8gBnvE5RYrr0BahNnkk= github.com/blevesearch/mmap-go v1.0.4 h1:OVhDhT5B/M1HNPpYPBKIEJaD0F3Si+CrEKULGCDPWmc= From 333c451b38ac803ba7a555608bcbfba3434ffe31 Mon Sep 17 00:00:00 2001 From: Likith B Date: Tue, 19 Nov 2024 13:39:42 +0530 Subject: [PATCH 3/4] Minor Name Changes --- dict.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dict.go b/dict.go index 05d95745..7c52ae99 100644 --- a/dict.go +++ b/dict.go @@ -166,7 +166,7 @@ func (i *DictionaryIterator) Next() (*index.DictEntry, error) { } term, postingsOffset := i.itr.Current() if fitr, ok := i.itr.(vellum.FuzzyIterator); ok { - i.entry.EditDistance = fitr.Distance() + i.entry.EditDistance = fitr.EditDistance() } i.entry.Term = string(term) if !i.omitCount { From d494eaa3e5e44bf992ba6c36965a44f79aff2883 Mon Sep 17 00:00:00 2001 From: Abhinav Dangeti Date: Wed, 20 Nov 2024 10:06:46 -0700 Subject: [PATCH 4/4] Upgrade vellum for necessary commit --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 805a0143..13b2e2e9 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/blevesearch/go-faiss v1.0.23 github.com/blevesearch/mmap-go v1.0.4 github.com/blevesearch/scorch_segment_api/v2 v2.2.16 - github.com/blevesearch/vellum v1.0.10 + github.com/blevesearch/vellum v1.0.11 github.com/golang/snappy v0.0.1 github.com/spf13/cobra v1.7.0 ) diff --git a/go.sum b/go.sum index 60627ab3..d15a1d18 100644 --- a/go.sum +++ b/go.sum @@ -10,8 +10,8 @@ github.com/blevesearch/mmap-go v1.0.4 h1:OVhDhT5B/M1HNPpYPBKIEJaD0F3Si+CrEKULGCD github.com/blevesearch/mmap-go v1.0.4/go.mod h1:EWmEAOmdAS9z/pi/+Toxu99DnsbhG1TIxUoRmJw/pSs= github.com/blevesearch/scorch_segment_api/v2 v2.2.16 h1:uGvKVvG7zvSxCwcm4/ehBa9cCEuZVE+/zvrSl57QUVY= github.com/blevesearch/scorch_segment_api/v2 v2.2.16/go.mod h1:VF5oHVbIFTu+znY1v30GjSpT5+9YFs9dV2hjvuh34F0= -github.com/blevesearch/vellum v1.0.10 h1:HGPJDT2bTva12hrHepVT3rOyIKFFF4t7Gf6yMxyMIPI= -github.com/blevesearch/vellum v1.0.10/go.mod h1:ul1oT0FhSMDIExNjIxHqJoGpVrBpKCdgDQNxfqgJt7k= +github.com/blevesearch/vellum v1.0.11 h1:SJI97toEFTtA9WsDZxkyGTaBWFdWl1n2LEDCXLCq/AU= +github.com/blevesearch/vellum v1.0.11/go.mod h1:QgwWryE8ThtNPxtgWJof5ndPfx0/YMBh+W2weHKPw8Y= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= 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=