Add /search tests (#3025)

This commit is contained in:
Till 2023-03-27 11:26:52 +02:00 committed by GitHub
parent aa1bda4c58
commit e8b2162a01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 389 additions and 50 deletions

View file

@ -33,6 +33,7 @@ type Indexer interface {
Index(elements ...IndexElement) error
Delete(eventID string) error
Search(term string, roomIDs, keys []string, limit, from int, orderByStreamPos bool) (SearchResult, error)
GetHighlights(result SearchResult) []string
Close() error
}
@ -71,3 +72,7 @@ func (f *Search) Delete(eventID string) error {
func (f *Search) Search(term string, roomIDs, keys []string, limit, from int, orderByStreamPos bool) (SearchResult, error) {
return SearchResult{}, nil
}
func (f *Search) GetHighlights(result SearchResult) []string {
return []string{}
}