Skip to content

Commit

Permalink
MB-57888: Naming changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Likith101 committed Feb 7, 2025
1 parent ebef58e commit 0c64666
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func filterFields(fieldsInv []string, fieldInfo map[string]*index.UpdateFieldInf
rv := make([]string, 0)
for _, field := range fieldsInv {
if val, ok := fieldInfo[field]; ok {
if val.RemoveAll {
if val.Deleted {
continue
}
}
Expand Down Expand Up @@ -636,7 +636,7 @@ func mergeUpdatedFields(segments []*SegmentBase) map[string]*index.UpdateFieldIn
if _, ok := fieldInfo[field]; !ok {
fieldInfo[field] = info
} else {
fieldInfo[field].RemoveAll = fieldInfo[field].RemoveAll || info.RemoveAll
fieldInfo[field].Deleted = fieldInfo[field].Deleted || info.Deleted
fieldInfo[field].Index = fieldInfo[field].Index || info.Index
fieldInfo[field].Store = fieldInfo[field].Store || info.Store
fieldInfo[field].DocValues = fieldInfo[field].Store || info.DocValues
Expand Down
15 changes: 7 additions & 8 deletions section_inverted_text_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,15 @@ func mergeAndPersistInvertedSection(segments []*SegmentBase, dropsIn []*roaring.
return nil, 0, seg.ErrClosed
}

var dict *Dictionary
var err2 error
if info, ok := updatedFields[fieldName]; ok && info.Index {
dict = nil
} else {
dict, err2 = segment.dictionary(fieldName)
if err2 != nil {
return nil, 0, err2
}
continue
}

dict, err2 := segment.dictionary(fieldName)
if err2 != nil {
return nil, 0, err2
}

if dict != nil && dict.fst != nil {
itr, err2 := dict.fst.Iterator(nil, nil)
if err2 != nil && err2 != vellum.ErrIteratorDone {
Expand Down

0 comments on commit 0c64666

Please sign in to comment.