Skip to content
Snippets Groups Projects
Commit f27c5260 authored by Nick Thomas's avatar Nick Thomas
Browse files

Indexer should refer blobs, not files

parent 88a7459f
No related branches found
No related tags found
1 merge request!1Initial implementation of an elasticsearch indexer in Go
Loading
Loading
@@ -24,7 +24,7 @@ func (i *Indexer) SubmitCommit(c *object.Commit) error {
return nil
}
 
func (i *Indexer) SubmitFile(file *object.File) error {
func (i *Indexer) SubmitBlob(file *object.File) error {
log.Print("Write: ", file.Name)
// TODO: touch Submitter
// Read & json-encode the file so we do the same work as the Ruby version
Loading
Loading
@@ -37,7 +37,7 @@ func (i *Indexer) SubmitFile(file *object.File) error {
return nil
}
 
func (i *Indexer) RemoveFile(file *object.File) error {
func (i *Indexer) RemoveBlob(file *object.File) error {
log.Print("Delete: ", file.Name)
// TODO: touch Submitter
return nil
Loading
Loading
@@ -48,7 +48,7 @@ func (i *Indexer) IndexCommits() error {
}
 
func (i *Indexer) IndexBlobs() error {
return i.Repo.EachFileChange(i.SubmitFile, i.SubmitFile, i.RemoveFile)
return i.Repo.EachFileChange(i.SubmitBlob, i.SubmitBLob, i.RemoveBlob)
}
 
func (i *Indexer) Index() error {
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment