mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-05 21:23:10 -06:00
Remove unneeded method
This commit is contained in:
parent
7b5baa6da8
commit
36f0034263
|
|
@ -67,13 +67,8 @@ func (f *Search) Close() error {
|
|||
return f.FulltextIndex.Close()
|
||||
}
|
||||
|
||||
// FulltextIndex indexes a given element
|
||||
func (f *Search) Index(e IndexElement) error {
|
||||
return f.FulltextIndex.Index(e.EventID, e)
|
||||
}
|
||||
|
||||
// BatchIndex indexes the given elements
|
||||
func (f *Search) BatchIndex(elements []IndexElement) error {
|
||||
// Index indexes the given elements
|
||||
func (f *Search) Index(elements ...IndexElement) error {
|
||||
batch := f.FulltextIndex.NewBatch()
|
||||
|
||||
for _, element := range elements {
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ func mustAddTestData(t *testing.T, fts *fulltext.Search, firstStreamPos int64) (
|
|||
}
|
||||
e.SetContentType(gomatrixserverlib.MRoomTopic)
|
||||
batchItems = append(batchItems, e)
|
||||
if err := fts.BatchIndex(batchItems); err != nil {
|
||||
if err := fts.Index(batchItems...); err != nil {
|
||||
t.Fatalf("failed to batch insert elements: %v", err)
|
||||
}
|
||||
return eventIDs, roomIDs
|
||||
|
|
|
|||
Loading…
Reference in a new issue