Ahmet Arslan wrote: > > Faceting is done on tokens. <result name="response" returns the original > value (not analyzed) of documents. > Can you explain more what are you trying to do? > I am working on a multi language website. I need to perform faceting on the exact same records, but need to display facet values in appropriate languages. Therefore I copy key values to language specific fields, and then I associate those field types with language specific synonym files.
For instance I have keys stored in apt_type and I copy them to locale specific fields apt_type_en (field type enAptType) apt_type_fr (field type frAptType) apt_type_it (field type itAptType) Each field type uses SynonymFilterFactory to pull translations from files db_apartment_types_en.txt db_apartment_types_fr.txt db_apartment_types_it.txt and so forth. When I use this in the context of my website, I get the locale that the user is using (for instance en_US), and then I issue a query which performs faceting against apt_type_en field, giving me facet values in English, as defined in the synonym file db_apartment_types_en.txt. What I need it to do is to give me the same value for the document result as well, otherwise I need to perform this localization elsewhere in the application, and I prefer to do it once. Ahmet Arslan wrote: > > In db_apartment_types_en.txt file if you use comma (,) instead of => > faceting will return both: > > <lst name="facet_fields"> > <lst name="apt_type_en"> > <int name="One Bedroom Apartment">2</int> > <int name="200">2</int> > </lst> > </lst> > > I tried this but no luck. Based on the documentation here http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.SynonymFilterFactory it says: If expand is true, a synonym will be expanded to all equivalent synonyms. If it is false, all equivalent synonyms will be reduced to the first in the list. I set the expand to false, and I changed the synonym file to be in this format: One\ Bedroom\ Apartment,100 But it is still not expanding . I also tried 100,One\ Bedroom\ Apartment but without luck. Any ideas? Thanks! -- View this message in context: http://old.nabble.com/Expanding-synonyms-for-both-facets-and-response-results-tp26912229p26915392.html Sent from the Solr - User mailing list archive at Nabble.com.