On 2/13/07, Chris Hostetter <[EMAIL PROTECTED]> wrote:

: I am using the synonyms only at query time.
: Below is the field analysis.

FYI: I think what yonik ment was the section of your schema.xml that
defines the fieldtype.

: It seems like the culpit is the space in the phrase "best buy" in
: synonyms.txt.

because of some limitations in the way Analyzers can indicate that
multiple tokens occupy the same space, multiword synonyms are inheriently
tricky ... there is extensive discussion on this in the wiki...

http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#head-2c461ac74b4ddd82e453dc68fcfc92da77358d46

...in a nut shell: there is no clean way to do query time multiword
synonyms.

To be clear, no clean way to do *expansion* as opposed to reduction at
query time, when the alternatives are of different lengths.

You could use index-time expansion, a combination of index time and
query time reduction on the same synonym dictionary, or only handle
the multi-token alternatives during indexing with expansion, and do
query-time synonym expansion on the remaining alternatives.

-Yonik

Reply via email to