Site structure
Version 4.x > Site structure > Search Results View modes: 
User avatar
Member
Member
nnarayanan - 3/10/2010 2:19:43 PM
   
Search Results
Hi,

I am incorporating forum search in my site. I have a problem in the way search results are displayed. Let me try and explain the problem using an example, my search results are displayed based on the keyword, there are about 27 occurrences so it flows thru 3 pages. The problem I am facing is this, the relevance of search is upside down, meaning the most relevant posts appears on the 3rd page and not the 1st page. So is there a way that I can make the most relevant posts appear at the 1st page instead of 3rd?

Thanks in advance.

Regards,
Nitya Narayanan

User avatar
Kentico Support
Kentico Support
kentico_radekm - 3/16/2010 7:21:18 AM
   
RE:Search Results
Hello.

Could you please try go to your smart search result web part´s properties, find "Search sort" property and use ##SCORE## value here? It means that the result will be sorted by score. Thank you.

Best Regards,
Radek Macalik

User avatar
Member
Member
nnarayanan - 3/17/2010 8:53:57 AM
   
RE:Search Results
Hello,

Thanks for your reply.

I would like to clarify couple of things:
- I am currently using Forum search webpart for search results as we would like to have a separate search just for forums. Being that as an objective, I am unable to use smart search since I couldn't find a way to filter only the forum posts. So is there a way for me to use smart search webpart to search only forums instead of using forums search webpart?

- In forum search webpart there is no "search sort" option available, infact there no option to order or filter the search results. Please let me know if I can sort the results by date?

Thanks.

Regards,
Nitya Narayanan

User avatar
Kentico Support
Kentico Support
kentico_radekm - 3/22/2010 9:00:06 AM
   
RE:Search Results
Hello.

Thank you for clarification.
For forum search result web part, you can sort it according to PostTime (this is by default), PostSubject or PostUserName. If you would like to sort it by some custom condition, you would need to ensure it in code-behind of CMSModules\Forums\Controls\Layouts\Flat\SearchResults.ascx.cs control. There is following code on the line 24: DataSet results = GetSearchDataSet();, so you can modify and sort that dataset according to your needs.

Best Regards,
Radek Macalik