I also tried the 4.10.4 default example and set up the synonym list like
this:

{
  "responseHeader":{
    "status":0,
    "QTime":2},
  "synonymMappings":{
    "initArgs":{
      "ignoreCase":true,
      "format":"solr"},
    "initializedOn":"2015-04-15T20:26:02.072Z",
    "managedMap":{
      "Battery":["Deadweight"],
      "GB":["GiB",
        "Gigabyte"],
      "TV":["Television"],
      "happy":["glad",
        "joyful"]}}}

I added a dynamicField called my_syntext with a type of
managed_english per the example.

Then I indexed an example from the ipod data set with my_syntext set
to Full Battery for you as the text.

Finally, did a search on my_syntext for Deadweight and nothing came
back. I reloaded the core and even restarted solr. Nothing seemed to
work.



On Wed, Apr 15, 2015 at 3:04 PM, Yonik Seeley <ysee...@gmail.com> 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 <mikerthom...@gmail.com>
> 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
>

Reply via email to