This project is read-only.
7

Resolved

error when paging advanced search results

description

On closer inspection it appears to be down to how the Utility class methods ExtractQuery and ExtractFormData - this code does not actually throw an exception but I think the logic here might be the source of the issue.
 
When you go from advanced search page to results page it is fine since the post data contains all the advanced search fields and the code executes as intended. As soon as you page however you get problems. The check for "POST" is going to be true for postbacks as well (like when you click the paging links) and the ExtractFormData will not find any of the advanced search data since they were part of the previous request.
 
isAdvancedSearch will be false and the query method will get set to keyword query - but there will be no query string variables since we did an advanced search. I have come across this problem before, however for the web part I was writing it was enough just to pass what was required in the query string when the paging buttons were clicked. I don't really have any ideas how to do this for faceted search :( On the the paging post core results must get the query from viewstate or somewhere? You would need to persist the advanced search data or query between the paging postbacks somewhere I guess. Anyway I hope this is of some help.
 
 
if
 
 
(HttpContext.Current.Request.HttpMethod == "POST")

 
{
 

 
 
 
FormData formData = ExtractFormData(out isAdvancedSearch);

 
query.FormData = formData;
 
query.IsAdvancedSearch = isAdvancedSearch;
 
query.QueryMethod =
 
 
 
QueryMethodEnum.FullTextSqlQuery;

 
}
 

 
 
 
if (!isAdvancedSearch)

 
{
 
query.QueryMethod =
 
 
 
QueryMethodEnum.KeywordQuery;

comments

leonidly wrote Dec 16, 2008 at 9:44 PM

The paging issue for advanced search is a postback error that will be solved conceptually first. Core FS functionaliy is based on GET redirects. Implementing POST is in the todo list. Quick solution isn't anticipated.

eegestad wrote Dec 29, 2008 at 6:08 PM

Leonid:

The build from 12062008 still has this issue. There is no changeset associated with the 12062008 build. Is the 12062008 build associated with the changeset #26318? Is there any timeline as to when this issue will be part of a release. Just trying to look at options for using this solution - which is FANTASTIC by the way - with advanced search being available as an option.

wrote Dec 29, 2008 at 6:08 PM

meerasharif wrote Dec 30, 2008 at 9:03 AM

Any update on the Advanced Search paging issue.
Its urgent for me.

Thanks
Meera

wrote Jan 16, 2009 at 11:11 AM

wrote Feb 9, 2009 at 2:00 PM

wrote Feb 18, 2009 at 4:49 PM

wrote Mar 26, 2009 at 9:23 PM

wrote May 4, 2009 at 6:25 PM

wrote Feb 14, 2013 at 3:41 AM

wrote May 16, 2013 at 8:10 AM

wrote May 16, 2013 at 8:10 AM

wrote Jun 14, 2013 at 7:52 AM