Troubleshooting the Migration of Verity collections from CF 4.5 to CF 7
I spent quite a while trying to figure out why a collection that was migrated from 4.5 to 7 was producing different search results. My first assumption was that when the collections were moved, they were just not re-indexed properly, or that they were corrupt. So, I purged, created and re-indexed them all…which did nothing at all - same results. I was also under the assumption that both the database and SQL which populates the collection were the same, but I needed to be sure. They were, unfortunately. I poked around for a while in Macromedia tech notes, and found a few know issues with Verity K2 on CF7, but none applied directly to this issue. So then it dawned on me: if the SQL populating the collection is identical, maybe the SQL is simply not returning the same result sets, for some reason. Again, no luck - same result sets on both machines.
I then settled on the fact that Verity K2 must simply index or search the data differently, thereby returning different results. I know the Verity engines that shipped with 4.5 and 7 are in fact very different, but I had another item to check and am not sure why it didn’t occur to me sooner: Just because the result sets used to populate the collections were identical, maybe all the data that was going *in* was not the same. I checked the number of records searched via the RecordsSearched property and it turns out that the old site, running 4.5 was searching almost 3 times more records. For some reason the data wasn’t going into the collection…
There are four collections but all had something in each SQL statement that was similar - the ‘|’ used to concatenate fields which was used to treat the field as a list when it was output.
<cfquery name="rsGetPubs" datasource="#request.DSN#"> SELECT PubID, PubTitle, OutletTitle, Article, Keywords, Pubtitle & '|' & fileDate AS multVals FROM publications </cfquery>
I was using the concatenated field in one of the custom attributes which was used for display purposes:
<cfindex collection = "pub" action = "update" type ="Custom" title = "Publications" key = "pubID" custom1 = "#myself##xfa.showPubDetail&pubID=" custom2 = "multVals" body = "PubTitle,OutletTitle,Keywords,Article" query = "rsGetPubs"> </cfindex>
Removing the “|” and taking advantage of the additional two custom field allowed in the cfindex tag and that is pretty much that. Not sure if this is documented somewhere, but if it is I couldn’t find it. It didn’t like other alternative characters, such as “$” or “^”. It’s obviously got something to do with special characters. Hope this saves someone a few hours!
Post a Comment