Merge pull request #4826 from kobergj/FixSpaceIndexing
[skip ci] FixSpaceIndexing
This commit is contained in:
2 files changed
+12
-7
No files matched your search
@@ -167,11 +167,7 @@ func (b *Bleve) Search(_ context.Context, sir *searchService.SearchIndexRequest)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
pID, err := storagespace.ParseID(getValue[string](hit.Fields, "ParentID"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
pID, _ := storagespace.ParseID(getValue[string](hit.Fields, "ParentID"))
|
||||
match := &searchMessage.Match{
|
||||
Score: float32(hit.Score),
|
||||
Entity: &searchMessage.Entity{
|
||||
|
||||
@@ -265,9 +265,18 @@ func (p *Provider) IndexSpace(ctx context.Context, req *searchsvc.IndexSpaceRequ
|
||||
p.logger.Error().Err(err).Msg("error extracting content")
|
||||
}
|
||||
|
||||
var pid string
|
||||
if info.ParentId != nil {
|
||||
pid = storagespace.FormatResourceID(*info.ParentId)
|
||||
}
|
||||
r := engine.Resource{
|
||||
ID: storagespace.FormatResourceID(*info.Id),
|
||||
RootID: storagespace.FormatResourceID(*ref.ResourceId),
|
||||
ID: storagespace.FormatResourceID(*info.Id),
|
||||
RootID: storagespace.FormatResourceID(provider.ResourceId{
|
||||
StorageId: info.Id.StorageId,
|
||||
OpaqueId: info.Id.SpaceId,
|
||||
SpaceId: info.Id.SpaceId,
|
||||
}),
|
||||
ParentID: pid,
|
||||
Path: ref.Path,
|
||||
Type: uint64(info.Type),
|
||||
Document: doc,
|
||||
|
||||
Reference in new issue
Block a user