0
0
Fork 0

scorch zap miscellaneous typos

This commit is contained in:
Steve Yen 2018-01-17 11:29:32 -08:00
parent 0fc9b4b74a
commit dc62324e02
3 changed files with 6 additions and 4 deletions

View File

@ -43,7 +43,7 @@ func PersistSegment(memSegment *mem.Segment, path string, chunkFactor uint32) (e
return err
}
// bufer the output
// buffer the output
br := bufio.NewWriter(f)
// wrap it for counting (tracking offsets)

View File

@ -65,7 +65,7 @@ func (s *Segment) loadFieldDocValueIterator(field string,
fieldDvLoc uint64) (*docValueIterator, error) {
// get the docValue offset for the given fields
if fieldDvLoc == fieldNotUninverted {
return nil, fmt.Errorf("loadFieldDocValueConfigs: "+
return nil, fmt.Errorf("loadFieldDocValueIterator: "+
"no docValues found for field: %s", field)
}

View File

@ -168,11 +168,13 @@ func (s *Segment) loadConfig() error {
docValueOffset := chunkOffset - 8
s.docValueOffset = binary.BigEndian.Uint64(s.mm[docValueOffset : docValueOffset+8])
fieldsOffset := docValueOffset - 8
fieldsOffset := docValueOffset - 8
s.fieldsIndexOffset = binary.BigEndian.Uint64(s.mm[fieldsOffset : fieldsOffset+8])
storedOffset := fieldsOffset - 8
s.storedIndexOffset = binary.BigEndian.Uint64(s.mm[storedOffset : storedOffset+8])
docNumOffset := storedOffset - 8
s.numDocs = binary.BigEndian.Uint64(s.mm[docNumOffset : docNumOffset+8])
return nil
@ -181,7 +183,7 @@ func (s *Segment) loadConfig() error {
func (s *Segment) loadFields() error {
// NOTE for now we assume the fields index immediately preceeds the footer
// if this changes, need to adjust accordingly (or store epxlicit length)
// if this changes, need to adjust accordingly (or store explicit length)
fieldsIndexEnd := uint64(len(s.mm) - FooterSize)
// iterate through fields index