Implementation of GetModifiedSearchDocuments does not work
Add an Answer
Your question has been submitted and is awaiting moderation.
Thank you for reporting this content, moderators have been notified of your submission.
Hi,
I implemented the GetModifiedSearchDocuments function in my project, I can see it running in debugging, and I see it returning a List(Of DotNetNuke.Services.Search.Entities.SearchDocument)...
but it does not show in the search results and its not visible in the search tables.
Is there something extra I need to do to make this work?
Partial Class OneSearch
Inherits Entities.Modules.ModuleSearchBase
Public Overrides Function GetModifiedSearchDocuments(moduleInfo As DotNetNuke.Entities.Modules.ModuleInfo, beginDate As Date) As System.Collections.Generic.IList(Of DotNetNuke.Services.Search.Entities.SearchDocument)
'define the result
Dim res As New List(Of DotNetNuke.Services.Search.Entities.SearchDocument)
'set up articles
Dim iCat As Integer = BITshared.string2int(moduleInfo.TabModuleSettings("selected_category"))
Dim qArt As New OneTo_ArticlesInfo(0, 0, 0, iCat, "", False, False, True, False, False, 0, 0, Now, Now, Now, "", "", "", "", "", "", moduleInfo.PortalID, "")
Dim lstArt As List(Of Object) = qArt.list
For Each it As OneTo_ArticlesInfo In lstArt
'get country info
Dim oCountry As New OneTo_CountryInfo(it.country)
If oCountry Is Nothing Then Throw New Exception("Country not found:" & it.country)
Dim sIt As New DotNetNuke.Services.Search.Entities.SearchDocument()
sIt.Body = it.text_long
sIt.CultureCode = it.culture
sIt.Description = it.text_short
sIt.IsActive = True
sIt.AuthorUserId = 0
sIt.Keywords = Nothing
sIt.Title = it.title
sIt.TabId = moduleInfo.TabID
sIt.QueryString = "id=" & it.articleid & "&" & "title=" & BITshared.max_length(it.title, 100)
sIt.RoleId = 0
sIt.Tags = Nothing
sIt.UniqueKey = it.articleid
sIt.SearchTypeId = 1
sIt.Url = ""
sIt.PortalId = it.portalid
res.Add(sIt)
Next
'return the result
Return res
End Function
End Class