We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60ebc9a commit c27a7c6Copy full SHA for c27a7c6
dict.go
@@ -38,6 +38,13 @@ type Dictionary struct {
38
// represents an immutable, empty dictionary
39
var emptyDictionary = &Dictionary{}
40
41
+func (d *Dictionary) Cardinality() int {
42
+ if d.fst != nil {
43
+ return d.fst.Len()
44
+ }
45
+ return 0
46
+}
47
+
48
// PostingsList returns the postings list for the specified term
49
func (d *Dictionary) PostingsList(term []byte, except *roaring.Bitmap,
50
prealloc segment.PostingsList) (segment.PostingsList, error) {
0 commit comments