ashish.narnoli12-gmail
-
8/19/2013 12:53:30 AM
Smart Search filter Query Culture wise
Hi, I have setup the Multiculture website and currently the site having 2 cultures. One is 'en-GB' and other is 'en-US'.
For the smart search functionality, i created ProductIndex including both Cultures. When i try to search any Product (may or may not be common in both cultures), it returned Result as desired.
Including this, i created Smart Search filter having a query like: "SELECT * FROM View_CLA_Category_Joined WHERE ShowInSearchFilters = 1 AND Published = 1 AND DocumentCulture LIKE '{%CMSContext.CurrentDocumentCulture.CultureCode%}' Order By NodeLevel, NodeOrder ASC"
This will return No Result.
If i pass "SELECT * FROM View_CLA_Category_Joined WHERE ShowInSearchFilters = 1 AND Published = 1 Order By NodeLevel, NodeOrder ASC" This will create Duplicate copies of each node (because the Searched product belongs to that Same category name which is common in both culture)
If i pass "SELECT * FROM View_CLA_Category_Joined WHERE ShowInSearchFilters = 1 AND Published = 1 AND DocumentCulture LIKE 'en-GB' Order By NodeLevel, NodeOrder ASC"
This returns the desired filter output.
So, my question is, where i am doing mistake for the Search filter?
Suggestions are highly appreciated :)
Thanks Ashish Narnoli
|