Villemos, Gert wrote:
Well, this is very interesting.
Looking at the documentation provided in the link it seems like the synonym definitions must be in a file. We would define the concept expansions in another format. My question is thus; Is it possible to perform a synonym replacement based on not the file but another mechanism?
I guess no. The answer would thus be to create new TokenFilters and coresponding factory, and implement it to access our format. Right?
I've never tried but I think you can implement TokenFilterFactory that
accesses your format,
creates SynonymMap and passes it to SynonymFilter.
Would there be a way to enable / disable the expasion filter at runtime, i.e. for example through special parameters in the query sring?
No. SynonymFilter works for specific fields as you defined in schema.xml.
Koji