I want to use synonyms for my search. So I defined a 'synonyms' fieldType in schema.xml.
<fieldType name="foo" class="solr.TextField" positionIncrementGap="100">
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory" />
<filter class="solr.ManagedSynonymFilterFactory" managed="german" />
<!--<filter class="solr.SynonymGraphFilterFactory" ignoreCase="true" expand="true" managed="german" />-->
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
This fieldType is used by a field:
<field name="test" type="foo" required="true" />
Now I am adding synonyms to Solr (6.5.1) via the API, like this I can keep the synonyms updated via a web backend, e.g.
curl -X PUT -H 'Content-type:application/json' --data-binary '["mad","angry","insane"]}' "http://localhost:8983/solr/core/schema/analysis/synonyms/german"
That's pretty cool and adding works as expected. I can see them through:
http://localhost:8983/solr/core/schema/analysis/synonyms/german
My problem is that this needs re-indexing, before they work, even though I am using query-time instead of index-time.
Is it possible to manage the synonyms "on the fly" without re-indexing?
My impression is, yes, as long as I am using query-time, but this is not working for me, so I guess I did something wrong?
Do I have to use synonyms.txt over the API to achive this?
But the text file would not as easy as the API to maintain the synonyms I guess?
Thanks for reading and best regards