API
Version 7.x > API > Faceted smart search with dynamic data View modes: 
User avatar
Member
Member
Erin - 8/22/2013 12:25:41 PM
   
Faceted smart search with dynamic data
I need to create a faceted search based on dynamic data with the filter options changing upon drill-down, similar to Amazon's search. I'm using v7.0.28 along with a smart search dialog, a smart search results, & a smart search filter. The filter options need to reflect specific fields associated with the current search results data set. Could someone please explain how to do this? Thanks! :-)

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 8/23/2013 5:51:20 AM
   
RE:Faceted smart search with dynamic data
Hello,

Have you checked the faceted search examples on the sample Corporate site as mentioned here or in this blog post?

Best regards,
Juraj Ondrus

User avatar
Member
Member
Erin - 8/23/2013 8:32:32 AM
   
RE:Faceted smart search with dynamic data
I checked out both and neither seems to provide a solution to what I need to do. The reference to the Developer's Guide builds the facets manually (i.e. not based on the search results), and unless I'm missing something, Categories as mentioned in the blog post won't do the trick either.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 8/26/2013 6:38:50 AM
   
RE:Faceted smart search with dynamic data
Hi,

the idea is still the same. However you want to have something very custom so you need to create fully custom filter where you will fill the drop downs with the data dynamically in the code.

Best regards,
Juraj Ondrus

User avatar
Member
Member
Erin - 8/26/2013 11:03:03 AM
   
RE:Faceted smart search with dynamic data
That is exactly what I need to do! Thank you for wording it so much more clearly than I did. :-)

I'm trying to hook into the query string & see if there is a way I can add to it or modify it so that Lucene will return the data I need to access. Each product in this system has custom fields created specifically for faceted searching. (In fact, these fields are all named "FS_something", such as FS_Color, FS_MaxWidth, etc.) The number & selection of these FS fields vary with essentially each product, which means there is no way of knowing in advance which of these fields will be available until the search is made. I am trying to build a list of these FS fields (& their available options/values) based on the current search result data set, so that the user may filter down more if they so desire.

For example, if a user searches on "paint", and none of the returned products have an "FS_MaxWidth", then I do not want FS_MaxWidth to show as a facet. I hope this explains my goal a little better. :-)

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 8/26/2013 9:58:23 PM
   
RE:Faceted smart search with dynamic data
Hi,

Thank you for the details. So, you need to build the custom filter like this. It will have set of the form controls where you will load data dynamically and then you will use it in the same way as described in the documentation and blog post mentioned above - you will use the same syntax as described in the "Using smart search filter" documentation linked above.

Best regards,
Juraj Ondrus