Sebastian Leupold wrote:
Dave, that could be the issue, I'd update the dates to non-null values, e.g.run the following statement in Host > SQL:
UPDATE {databaseOwner}[{objectQualifer}Users] SET CreatedOnDate = GetDate() WHERE CreatedOnDate Is Null
Sebastian,
Could you have meant changing the LastModifiedOn Date rather than the CreatedOnDate? Checking the stored procedure, LastModifiedOnDate is being called:
ValidUsers AS
(
SELECT UserId FROM ( SELECT UserId, ROW_NUMBER() OVER(ORDER BY UserId ASC) AS rownumber
FROM ( SELECT DISTINCT
( u.UserID )
FROM dbo.[Users] u
INNER JOIN dbo.[UserPortals] up ON up.UserId = u.UserID
INNER JOIN dbo.[vw_Profile] p ON p.UserID = u.UserID
INNER JOIN dbo.[ProfilePropertyDefinition] pd ON pd.PropertyDefinitionID = p.PropertyDefinitionID AND pd.Visible = 1 AND pd.PortalID = @PortalId
INNER JOIN ValidDataType dt ON dt.EntryID = pd.DataType
WHERE (up.PortalId = @PortalId OR up.PortalId IS NULL)
AND (u.LastModifiedOnDate > @StartDate OR (p.LastUpdatedDate IS NOT NULL AND (p.LastUpdatedDate > @StartDate OR pd.LastModifiedOnDate > @StartDate)))
AND ((p.PropertyValue IS NOT NULL AND p.PropertyValue <> '''') OR p.LastUpdatedDate IS NULL OR p.LastUpdatedDate > @StartDate)
) AS T WHERE UserID > @startUserId) AS T
WHERE rownumber <= @numberOfUsers
)
And in the Schedule History for the Search indexer, I was seeing this:
Search: Site Crawler
Starting. Content change start time 11/30/2014 6:40 AM
Tabs Indexed: 0
Modules (Metadata) Indexed: 0
Modules (Content) Indexed: 30782
Users Indexed: 5
Deleted Objects: 0
Total Items Indexed: 30787
Indexing Successful
Looking at the Users Table, User #6 had a valid LastModifiedOnDate, while User 7 did not.
So with that in mind, I changed the SQL script for LastModifiedOnDate from CreatedOnDate and ran the script. Looking at the users table in SQL Management, everything was updated nicely. I waited for about 15 minutes and then I checked the logs, and no errors! Looking at the search index schedule history and I see:
Search: Site Crawler
Starting. Content change start time 11/30/2014 6:48 AM
Tabs Indexed: 0
Modules (Metadata) Indexed: 0
Modules (Content) Indexed: 30782
Users Indexed: 1722
Deleted Objects: 0
Total Items Indexed: 32504
Indexing Successful
1722 users indexed instead of 5, although the first job after the 1722 users indexed actually indexed 5 users (which freaked me out for a second), however checking the event log shows no errors and the subsequent index job indexed 4 users.
Thanks so much for all of your help, I could not have done this without you!