: I'd like to take keywords in my documents, and expand them as synonyms; for
: example, if the document gets annotated with a keyword of 'sf', I'd like
: that to expand to 'San Francisco'.  (San Francisco,San Fran,SF is a line in
: my synonyms.txt file).
: 
: But I also want to be able to display facets with counts for these keywords;
: I'd like them to be suitable for display.
        ...

: I've also done a copyfield to a 'KeywordsString' field, which is
: defined as "string". i.e.
: 
: <fieldType name="string" class="solr.StrField" sortMissingLast="true"
: omitNorms="true"/>

It sounds like you are on the right track ... the key isearch on a field 
with synonyms expanded (at index time) and facet on a field with synonyms 
collapse (at index time)

try chagning the fieldtype you facet on to be a TextField with the 
KeywordTokenizer, and then use the SynonymFilter on it ... that should 
work (but i haven't tried it)

if you format your synonyms file properly (commas instead of arrows), you 
can use the exact smae file for both fieldtypes, even though one will 
expand, and the other will collapse.


-Hoss

Reply via email to