Skip to content
Snippets Groups Projects

Initial implementation of an elasticsearch indexer in Go

Merged Nick Thomas requested to merge 1-initial-implementation into master
All threads resolved!
52 files
+ 161538
7
Compare changes
  • Side-by-side
  • Inline
Files
52
+ 5
4
@@ -84,7 +84,8 @@ func (i *Indexer) BuildBlob(file *object.File, commitSHA string) (*Blob, error)
return nil, skipBinaryBlob
}
content := string(b)
content := tryEncodeBytes(b)
filename := tryEncodeString(file.Name)
return &Blob{
Type: "blob",
@@ -93,9 +94,9 @@ func (i *Indexer) BuildBlob(file *object.File, commitSHA string) (*Blob, error)
RepoID: parentID,
CommitSHA: commitSHA,
Content: content,
Path: file.Name,
Filename: file.Name,
Language: DetectLanguage(file.Name, b),
Path: filename,
Filename: filename,
Language: DetectLanguage(filename, b),
}, nil
}
Loading