In the syntax of Fredhopper Query Language, there is a notion of filters of the form
|secondid<{s1,..,sn}
or
|itemid<{x1,..,xn}
Secondid Filter
The filters of the form |secondid<{s1,..,sn} are called secondid filters, which take zero or more secondid s1..sn. These filters restrict the items allowed to be shown at a location. For example, the query //catalog01/en_US/color=red|secondid<{123,456} would return a response containing items that are both colour red and has secondid either 123 or 456.
Detail Page Link
It is possible to access the detail page of item 123 using the query //catalog01/en_US/color=red|secondid<{123}&fh_view=detail, however, this would actually be the location with a single item 123 and not the location //catalog01/en_US/color=red, and both facets and any trigger entities (e.g. campaigns) would reflect this. This is different to //catalog01/en_US/color=red&fh_secondid=123, which shows item 123 at location //catalog01/en_US/color=red.
| In both //catalog01/en_US/color=red&fh_secondid=123 and //catalog01/en_US/color=red|secondid<{123}&fh_view=detail, item 123 would only be shown if it actually has colour red, that is, in the result set of //catalog01/en_US/color=red. |
| Note that //catalog01/en_US/color=red|secondid<{123,456}&fh_sort_by= where parameter fh_sort_by is empty, will return a result set where items are sorted as indicated by the list of secondid given to the secondid filter. Moreover, given the query //catalog01/en_US/color=red|secondid<{123,999,456}&fh_sort_by= if item 999 is not in the location //catalog01/en_US/color=red, the result sets would contain the list of only items 123 and 456. |
Item id filter
The filters of the form |itemid<{x1,..,xn} are called item id filters, which take zero or more item ids x1..xn. These filters also restrict the items allowed to be shown at a location. For example, the query //catalog01/en_US/color=red|itemid<{123,456} would return a response containing items that are both color red and has internal item id either 123 or 456. Note that the item id filter is usually only used internally as item ids are an implementation detail and are not exposed to the frontend.
Comments
0 comments
Please sign in to leave a comment.