We have a line like this in the JSP page...
IxiaResultSpace originalResults =...followed by a few lines later by a line like this...
search.SearchDocuments((String)session.getAttribute("resultQuery"));
"<include TYPE=\"ResultSpace\">" + sessionID + "-ALL</include>"All was well.
The logic of the page overall is more than a bit wonky, but we decided to port first and revise later. When done, I was getting an error that said
"vrn2nc55cxej5knnemwyzvqv-ALL is not a valid ResultSpace include /query/andkey/include at Ixiasoft.TextmlServer.ResultSpace.ExecuteQuery() at Ixiasoft.TextmlServer.ResultSpace.get_Count() at searchresults.RunSearch() in c:\Greenwood Web Sites\devsite\searchresults.aspx.cs:line 357."
What's that now?
After some trips through the debugger, poking around the documentation and some googling (no one blogs on this thing) I went back to the old method of just writing out strings to the page. Nothing jumped out as an error and nothing worked.
By sheer chance, I decided to see what the string value of the original query was so I added...
string originalQuery = originalResults.TextmlQuery;...to the page with the intent of displaying it somewhere for review and suddenly the error stopped being thrown and the code functioned as expected. After making sure I made no other changes I tested it again. I commented out that line and the error was thrown. I put the line back in and the page ran fine. A co-worker asked if the Count property forced it work as well and it does.
I can't explain this one.
No comments:
Post a Comment