-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Index sections #159
Index sections #159
Conversation
work in progress
section_inverted_index.go
Outdated
io.init = true | ||
} | ||
|
||
if fieldID == ^uint16(0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you add some commentary around when fieldID is set to this - which should be math.MaxUint16.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, i'll be adding commentary to certain portions of the changes in the coming commits.
segment.go
Outdated
numDocs uint64 | ||
storedIndexOffset uint64 | ||
fieldsIndexOffset uint64 | ||
newFieldsIndexOffset uint64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose the reason you kept newFieldsIndexOffset
along side fieldsIndexOffset
is for backward compatibility? The new attribute could use a better name implying sections are in play.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was more related to the fact that the newFieldsIndexOffset relates to information that has fieldsIndex info tagged alongside the section type informations.
@@ -294,6 +312,69 @@ func (s *SegmentBase) loadFields() error { | |||
return nil | |||
} | |||
|
|||
func (s *SegmentBase) loadFieldsNew() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here - name to indicate sections.
Or perhaps it'd be cleaner to declare a new struct which comes with new attributes and methods -
type SegmentBase struct {
// leave as is
}
type SegmentBaseV2 struct {
SegmentBase
sectionFieldsIndexOffset uint64
...
}
func (s *SegmentBaseV2) loadSectionFields() error {
}
type Segment struct {
SegmentBaseV2
...
}
If this can cause way too much of refactoring, you can ditch it. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh cool, thanks! I'll think more on these lines and get back to you on this.
duplicate of #165 |
work in progress