Open alxvallejo opened 12 years ago
Synonym functionality is specific to Solr, not this plugin. You can configure your instance of Solr to do whatever you want, the schema provided with the plugin is just a bare minimum example.
Currently, the "content" field is configured to do synonyms at query time only. You will need to define your own synonyms in the synonyms.txt file. If you want synonyms on other fields, either configure the field types with a SynonymFilterFactory or just change the type of the field to "text" which is already configured.
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.SynonymFilterFactory
Thanks for the quick reply Matt. If the plugin schema is just an example, I take it I should be looking at the solr data folder on the server. The plugin schema is configured to use text so I may just be looking in the wrong place. However, when I open up the schema.xml in the solr data/conf folder (where it's installed on my server), I see this:
fieldType name="text" class="solr.TextField" positionIncrementGap="100"> analyzer type="index"> tokenizer class="solr.WhitespaceTokenizerFactory"/> filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
So I'm assuming I have this set up correctly. I'm not sure what you're referring to when you say "content" field.
Whatever schema is in the conf folder of your solr home directory is being used. It doesn't sound like you are very familiar with Solr so you should be using the schema provided with the plugin.
Thanks Matt. That helps a lot.
Hey Matt, Revisiting this issue, it seems that the only instance of 'synonyms.txt' in the schema.xml in the plugin is found in the field type of 'text' and not 'content' as you stated above. The 'content' field is given this:
on line 92 but I can't find where the synonym filter is attached.
I had this working at one point but have since found to not process synonyms at the query level.
I'm doing my best to explore the functionality of this plugin and I would be interested in expanding the online documentation resources surrounding this plugin.
First, does this plugin support the use of synonyms.txt ? There are two analyzers that feature the SynonymFilterFactory in the schema.xml of the plugin directory.
A Query analyzer uses the WhitespaceTokenizerFactory and filters the synonyms.txt as featured on line 40, but it does not seem to do the job when I go and run a search.
I'm not sure what the second use of the SynonymFilterFactory is used for (see line 51).
Any help is greatly appreciated. Thanks!