diff --git a/cmd/eksterd/http.go b/cmd/eksterd/http.go index cd6d5a4..abe1f91 100644 --- a/cmd/eksterd/http.go +++ b/cmd/eksterd/http.go @@ -152,10 +152,12 @@ func loadSession(sessionVar string, conn redis.Conn) (session, error) { if err != nil { return sess, err } + err = redis.ScanStruct(data, &sess) if err != nil { return sess, err } + return sess, nil } diff --git a/cmd/eksterd/search.go b/cmd/eksterd/search.go index b946e9e..910bd48 100644 --- a/cmd/eksterd/search.go +++ b/cmd/eksterd/search.go @@ -33,7 +33,6 @@ type indexItem struct { } func addToSearch(item microsub.Item, channel string) error { - // TODO: add channel when indexing if index != nil { indexItem := indexItem{item, channel} err := index.Index(item.ID, indexItem) @@ -90,6 +89,7 @@ func querySearch(channel, query string) ([]microsub.Item, error) { web_1 | (string) (len=16) "author.longitude": (string) "", */ + // TODO: fetch results from the channel instead of the search result hits := res.Hits for _, hit := range hits { fields := hit.Fields