1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-05 13:35:25 +02:00

add entries to search index

This commit is contained in:
Harvey Kandola 2017-08-15 19:41:44 +01:00
parent 2c5f73a486
commit 1b96c9093f
15 changed files with 244 additions and 417 deletions

View file

@ -146,6 +146,9 @@ func (h *Handler) convert(w http.ResponseWriter, r *http.Request, job, folderID
return
}
a, _ := h.Store.Attachment.GetAttachments(ctx, nd.RefID)
go h.Indexer.IndexDocument(ctx, nd, a)
response.WriteJSON(w, nd)
}

View file

@ -17,12 +17,14 @@ import (
api "github.com/documize/community/core/convapi"
"github.com/documize/community/core/env"
"github.com/documize/community/domain"
indexer "github.com/documize/community/domain/search"
)
// Handler contains the runtime information such as logging and database.
type Handler struct {
Runtime *env.Runtime
Store *domain.Store
Indexer indexer.Indexer
}
// UploadConvert is an endpoint to both upload and convert a document