Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm in the process to customize a search results page and I'm using the Refinement WebPart to target some metadata for which the client wants some drill-down. The client is bilingual, and wants to have the option to selecte the "Detected Language" category to filter the french and the english documents.

I'm using FAST, so all of that is easily configurable with a Category element in the Refinement WebPart. All the example I'm looking at on the web seem to be working and are easy to reproduce. But not for me.

I'm using that code to create the new category.

<Category 
        Title="Detected Languages" 
        Description="Use this filter to restrict results to detected languages" 
        Type="Microsoft.Office.Server.Search.WebControls.ManagedPropertyFilterGenerator" 
        MetadataThreshold="1" 
        NumberOfFiltersToDisplay="3" 
        MaxNumberOfFilters="3" 
        ShowMoreLink="False" 
        MappedProperty="DetectedLanguage" 
        ShowCounts="Count"/>

This code works fine. Only one problem : The language options are not "fr" or "en", but "12" and "9"! FAST is bringing back the ID instead of the name of the languages.

What are my options ?

share|improve this question

1 Answer 1

I would go for the following option map the (content-)language crawled property on a (new) meta-data property.

As you are using Fast, it is not possible to use a custom filter with a value mappingtype (http://msdn.microsoft.com/en-us/library/ff625185.aspx). Maybe you could try a range-type, as you are getting back numbers, but I am not sure.

If you are not happy with the results of option 1 (mapping of a crawled property), because you are only getting back "nl" or "en-US", you could create a custom pipeline extension, that maps the language ID's to your own text. But i guess that is too much of a hassle ;)

edit: just tested if it was fixed with SP1, but as far I could see, they didn't fix it, yet.

share|improve this answer
    
So, if I understand, that behaviour is buggy ? The pipeling extension seems to be a good idea, I'll try to look into that. –  Sébastien Levert Jul 23 '11 at 13:58
    
the custom value mapping filter is not buggy. It's just not implemented. –  Bas Lijten Jul 24 '11 at 11:42
    
That explains a lot... Thanks ! When I'll come back to the client, I'll let you know if it is all working ! –  Sébastien Levert Jul 26 '11 at 20:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.