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

Commits and blobs go in a subdocument

parent e57f8fe3
No related branches found
No related tags found
1 merge request!1Initial implementation of an elasticsearch indexer in Go
Loading
Loading
@@ -28,7 +28,7 @@ type Indexer struct {
func (i *Indexer) SubmitCommit(c *object.Commit) error {
commit := i.BuildCommit(c)
 
i.Submitter.Index(commit.ID, commit)
i.Submitter.Index(commit.ID, map[string]interface{}{"commit": commit})
return nil
}
 
Loading
Loading
@@ -44,7 +44,7 @@ func (i *Indexer) SubmitBlob(f *object.File, _, toCommit *object.Commit) error {
return fmt.Errorf("Blob %s: %s", f.Name, err)
}
 
i.Submitter.Index(blob.ID, blob)
i.Submitter.Index(blob.ID, map[string]interface{}{"blob": blob})
return nil
}
 
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