Implements the search part
This commit is contained in:
@@ -21,9 +21,11 @@ func (s *BleveIndexerSuite) SetUpSuite(c *C) {
|
||||
start := time.Now()
|
||||
s.i, err = bleve.New(filepath.Join(c.MkDir(), "satbd-test.bar.satellite"), buildAlbumMapping())
|
||||
c.Assert(err, IsNil)
|
||||
batch := s.i.NewBatch()
|
||||
for _, a := range albumsDataTest {
|
||||
c.Assert(s.i.Index(AlbumIDString(a.ID), &a), IsNil)
|
||||
c.Assert(batch.Index(AlbumIDString(a.ID), &a), IsNil)
|
||||
}
|
||||
c.Assert(s.i.Batch(batch), IsNil)
|
||||
log.Printf("Indexing took %s", time.Since(start))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user