Thanks. It turned out to be caused by me not using the
ManagedSynonymFilterFactory.
I added the dummy managed_en field:
<fieldType name="managed_en" class="solr.TextField"
positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.ManagedStopFilterFactory" managed="english" />
<filter class="solr.ManagedSynonymFilterFactory" managed="english"
/>
</analyzer>
</fieldType>
and defined a field that uses it in the schema block like so:
<field name="dummy_stuff" type="managed_en" indexed="true" stored="true"
multiValued="true" />
Here is the output of the managed synonym listing:
{
"responseHeader":{
"status":0,
"QTime":343},
"synonymMappings":{
"initArgs":{"ignoreCase":false},
"initializedOn":"2015-04-15T19:13:15.072Z",
"managedMap":{"Crota":["Crouton"]}}}
I posted this document successfully and can find it when I search for it
with this: *dummy_text: Crota*
{
"id": "stupidtestmessage",
"label": "Crota, Son of Oryx, lives!",
"dummy_stuff": [
"Crota, Son of Oryx, and pretty important dude in the Hive was
discovered alive and well in the hellmouth today!"
]
}
When I use *dummy_text: Crouton*, nothing comes back. I am pretty confident
that I am missing something here. Any ideas?
Thanks,
Mike
On Wed, Apr 15, 2015 at 3:04 PM, Yonik Seeley <[email protected]> wrote:
> I just tried this quickly on trunk and it still works.
>
> /opt/code/lusolr_trunk$ curl
> http://localhost:8983/solr/techproducts/schema/analysis/synonyms/english
>
> {
> "responseHeader":{
> "status":0,
> "QTime":234},
> "synonymMappings":{
> "initArgs":{
> "ignoreCase":true,
> "format":"solr"},
> "initializedOn":"2015-04-14T19:39:55.157Z",
> "managedMap":{
> "GB":["GiB",
> "Gigabyte"],
> "TV":["Television"],
> "happy":["glad",
> "joyful"]}}}
>
>
> Verify that your URL has the correct port number (your example below
> doesn't), and that "default-collection" is actually the name of your
> default collection (and not "collection1" which is the default for the
> 4x series).
>
> -Yonik
>
>
> On Wed, Apr 15, 2015 at 11:11 AM, Mike Thomsen <[email protected]>
> wrote:
> > We recently upgraded from 4.5.0 to 4.10.4. I tried getting a list of our
> > synonyms like this:
> >
> >
> http://localhost/solr/default-collection/schema/analysis/synonyms/english
> >
> > I got a not found error. I found this page on new features in 4.8
> >
> > http://yonik.com/solr-4-8-features/
> >
> > Do we have to do something like this with our schema to even get the
> > synonyms API working?
> >
> > <!-- A text type for English text where stopwords and synonyms are
> managed
> > using the REST API -->
> > <fieldType name="managed_en" class="solr.TextField"
> > positionIncrementGap="100">
> > <analyzer>
> > <tokenizer class="solr.StandardTokenizerFactory"/>
> > <filter class="solr.ManagedStopFilterFactory" managed="english" />
> > <filter class="solr.ManagedSynonymFilterFactory" managed="english" />
> > </analyzer>
> > </fieldType>
> >
> > I wanted to ask before changing our schema.
> >
> > Thanks,
> >
> > Mike
>