Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > handle smart serach results programmatically View modes: 
User avatar
Member
Member
paolo.costa - 3/4/2013 9:00:23 AM
   
handle smart serach results programmatically
Hello,

I'd try to handle the result dataset of a smart search in order to get all the values of a single document, for example the url, without using a transformation. i searched everywhere but I didn't find the API I should use.

Any help will be appreciated

Paolo

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 3/4/2013 9:17:43 AM
   
RE:handle smart serach results programmatically
Make a duplicate of the Smart Search results web part and you can do some work where it returns the data set. If I remember right the field "ID" has the class name (or document type) so you should be able to look at that.

User avatar
Member
Member
paolo.costa - 3/5/2013 8:57:21 AM
   
RE:handle smart serach results programmatically
I have this value in the Id fields of the result dataset:

01e7a0fdf539_CUSTOM_SEARCH_INDEX

What can I do with it?

Thanks

Paolo

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 3/5/2013 6:41:43 PM
   
RE:handle smart serach results programmatically
Hi,

You can access the search results dataset also directly in the search results control - \CMSModules\SmartSearch\Controls\SearchResults.ascx.cs. There is dataset called "results".

Best regards,
Juraj Ondrus

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 3/6/2013 7:25:42 AM
   
RE:handle smart serach results programmatically
As I mentioned the ID field contains the CMS.Class or Document Type code name in it. Depending on what you're looking for next you might be able to compare the document type and the SearchResultUrl() to filter what you need. Maybe debug through the SearchResults webpart and view the contents of the Results dataset and see what the data being returned is, should help.