Ahmet Arslan wrote: > > > Did you restart tomcat and re-index? I just confirmed faceting will return > above. use expand=true with comma separated entries to get above. You can > confirm expansion is done and original token is preserved with > analysis.jsp page. > >
Ok, I must be missing something very obvious. My analysis.jsp page shows the entry just fine: I enter: Field (name): apt_type_en Field value (index): 100 Analyze I get "Index Analyzer 100 One Bedroom Apartment" "One Bedroom Apartment" is the expected entry. However, for this query: http://localhost:8080/solrmn/hotels/select/?q=*:*&fl=apt_type_en&sort=&rows=10&start=0&rows=0&facet=true&facet.field=apt_type_en I still get these results in my results: > <result name="response" numFound="2" start="0"> > > <doc> > <str name="apt_type_en">100</str> > </doc> > > <doc> > <str name="apt_type_en">100</str> > </doc> > </result> > > <lst name="facet_counts"> > <lst name="facet_queries" /> > > <lst name="facet_fields"> > > <lst name="apt_type_en"> > <int name="One Bedroom Apartment">2</int> > </lst> > </lst> > <lst name="facet_dates" /> > </lst> > The expected result is this (no apt_type code in the <str> result, only the synonym value is expected): > > <result name="response" numFound="2" start="0"> > > <doc> > <str name="apt_type_en">One Bedroom Apartment</str> > </doc> > > <doc> > <str name="apt_type_en">One Bedroom Apartment</str> > </doc> > </result> > > <lst name="facet_counts"> > <lst name="facet_queries" /> > > <lst name="facet_fields"> > > <lst name="apt_type_en"> > <int name="One Bedroom Apartment">2</int> > </lst> > </lst> > <lst name="facet_dates" /> > </lst> > > I did restart tomcat, I reindexed, I changed the field type to the following: <fieldType name="enAptType" class="solr.TextField" sortMissingLast="true" omitNorms="true"> <analyzer> <tokenizer class="solr.KeywordTokenizerFactory"/> <filter class="solr.SynonymFilterFactory" synonyms="db_apartment_types_en.txt" ignoreCase="false" expand="true"/> </analyzer> </fieldType> And I also tried changing the entry in db_apartment_types_en.txt to 100,One\ Bedroom\ Apartment and One\ Bedroom\ Apartment,100 and either combination does not give me the desired result after reindexing and restarting tomcat. Thank you for helping me out on this one. -- View this message in context: http://old.nabble.com/Expanding-synonyms-for-both-facets-and-response-results-tp26912229p26918019.html Sent from the Solr - User mailing list archive at Nabble.com.