feat(search): relevance ranking + websearch_to_tsquery #13
@@ -42,8 +42,15 @@ public class WidgetLayoutController : ApiControllerBase
|
|||||||
{
|
{
|
||||||
_db.WidgetLayouts.Add(new WidgetLayout
|
_db.WidgetLayouts.Add(new WidgetLayout
|
||||||
{
|
{
|
||||||
UserId = UserId, WidgetKey = dto.WidgetKey, X = dto.X, Y = dto.Y, W = dto.W, H = dto.H,
|
UserId = UserId,
|
||||||
Visible = dto.Visible, SortOrder = dto.SortOrder, SettingsJson = dto.SettingsJson
|
WidgetKey = dto.WidgetKey,
|
||||||
|
X = dto.X,
|
||||||
|
Y = dto.Y,
|
||||||
|
W = dto.W,
|
||||||
|
H = dto.H,
|
||||||
|
Visible = dto.Visible,
|
||||||
|
SortOrder = dto.SortOrder,
|
||||||
|
SettingsJson = dto.SettingsJson
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,10 @@ public class SearchService : ISearchService
|
|||||||
|
|
||||||
return new PagedResult<EmailSummaryDto>
|
return new PagedResult<EmailSummaryDto>
|
||||||
{
|
{
|
||||||
Items = items, Page = r.Page, PageSize = r.PageSize, TotalCount = total
|
Items = items,
|
||||||
|
Page = r.Page,
|
||||||
|
PageSize = r.PageSize,
|
||||||
|
TotalCount = total
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -268,8 +268,12 @@ public class SyncService : ISyncService
|
|||||||
{
|
{
|
||||||
_db.Attachments.Add(new Attachment
|
_db.Attachments.Add(new Attachment
|
||||||
{
|
{
|
||||||
UserId = userId, EmailId = email.Id, FileName = Trunc(fileName, 512) ?? string.Empty,
|
UserId = userId,
|
||||||
MimeType = Trunc(mime, 255), SizeBytes = size, GmailAttachmentId = attId
|
EmailId = email.Id,
|
||||||
|
FileName = Trunc(fileName, 512) ?? string.Empty,
|
||||||
|
MimeType = Trunc(mime, 255),
|
||||||
|
SizeBytes = size,
|
||||||
|
GmailAttachmentId = attId
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -338,8 +342,11 @@ public class SyncService : ISyncService
|
|||||||
if (thread is not null) return thread;
|
if (thread is not null) return thread;
|
||||||
thread = new MailThread
|
thread = new MailThread
|
||||||
{
|
{
|
||||||
UserId = userId, GmailThreadId = gmailThreadId, Subject = Trunc(subject, 1024),
|
UserId = userId,
|
||||||
Snippet = Trunc(snippet, 2048), FirstMessageUtc = sentAt
|
GmailThreadId = gmailThreadId,
|
||||||
|
Subject = Trunc(subject, 1024),
|
||||||
|
Snippet = Trunc(snippet, 2048),
|
||||||
|
FirstMessageUtc = sentAt
|
||||||
};
|
};
|
||||||
_db.Threads.Add(thread);
|
_db.Threads.Add(thread);
|
||||||
return thread;
|
return thread;
|
||||||
|
|||||||
Reference in New Issue
Block a user