Changeset 40781 introduced a bug in searcher.cs


In search/Searcher.cs in the routine "private static List<SearchResultItem> ConvertHitsToSearchResultItems(Hits hits, int searchStartNodeId, ArrayList documentTypes)" a bug was introduced. The line which sets the ObjectType value ( resultItem.ObjectType = new Guid(hits.Doc(i).Get(FieldName.ObjectType.ToString()));) was moved below the if statement that uses the ObjectType (if (resultItem.ObjectType == Document._objectType)). This results in the searchStartNodeId, document types to search, user rights and doc types with no template checks to be ignored. The search, therefore, returns unexpected results. I verified the issue by moving the statement back up to where it was in the previous changeset and the search results returned expected results. I can upload a fix, but I am also working on adding a searchMediaStartNodeId parameter, which I am still in the middle of doing.
Thank you. Charlie.