kentico_romank
-
2/13/2014 2:11:49 AM
RE:Smart Search By Culture
Hi,
Since Piyush has valid maintenance contract, we have been in contact via email. Here is the possible solution, in case that anyone else has similar requirement.
There are few options how you can achieve this scenario, but first of all please make sure that you have done the following things:
1) DocumentCulture field must be searchable and tokenized (Site Manager -> Development -> System tables -> Ecommerce - SKU -> Search fields -> DocumentCulture) 2) You have to include all culture in your index (SM -> Administration -> Smart search -> your index -> Cultures) 3) In search result web part, set culture code property to ##ALL##
Now lets discuss the option you have (I suppose you are using smart search dialog, smart search filter and smart search results web parts on your page):
First option In search filter set following properties: - filter mode property: radio button - values: ;;All +DocumentCulture;cs-cz;Cesky +DocumentCulture;en-us;English -filter clause: none
There should be three radio buttons: All - all documents of all cultures are displayed, Cesky - only documents in Czech culture are displayed, English - only documents in English culture are displayed.
Second option In search filter set following properties: - filter mode property: checkbox -values: DocumentCulture;cs-cz;Cesky DocumentCulture;en-us;English -filter clause: must not
Now there should be two checkboxes, if you enter some search text without any checkbox enabled all documents of all cultures will be displayed. If you enable English checkbox, only documents in Czech culture will be displayed and vice versa. In case you will enable both checkboxes no documents will be displayed.. This approach might not be very user-friendly, but you can invert the behavior of the checkboxes, so for example if you check English, only documents in English culture will be displayed. In this case you will have to modify smart search filter web part, specificaly checkbox control and there invert this behavior.
Third option Please note that this option will be functional only after applying the hotfix number 75.
In Search filter set following properties: -filter mode property: checkbox -values: DocumentCulture;cs-cz;Cesky DocumentCulture;en-us;English DocumentCulture:(en) OR DocumentCulture;cs;English + Czech -filter clause: must
Best Regards, Roman Konicek
|