UsingSynonyms doesn't work

Vote:
 

UsingSynonyms doesnt work. Returns 0 results. Anything wrong with my syntax? I have tried appplying UsingSynonyms at the end of my query as well, same result.

We are not using Unifiedsearch by the way. We are searching for a specified .

The query also adds in Boostmatching and Facets.

Version: 12.2.0

query = query.For(searchTerm, q =>
                {
                    q.Query = searchTerm;
                }).UsingSynonyms()
                    .InField(x => x.ItemName)
                    .AndInField(x => x.Code)
                    .AndInField(x => x.ParentCategoryNames)
                    .AndInField(x => x.ItemTradeMarkName)
                    .AndInField(x => x.ItemPrimaryVendorId)
                    .AndInField(x => x.ItemPc1VendorsitemId)
                    .AndInField(x => x.ItemEOProducer)
                    //.AndInField(x => x.ItemIngredience) //kommentert ut; SG-3276
                    .AndInField(x => x.ItemPc2AdvertisingText);

                if (trackSearchTerm)
                {
                    query = query.Track();
                }
#189438
Edited, Mar 19, 2018 14:49
Vote:
 

What kind of index are you using locally? 

Synonyms does not work on demo indexes, which is kind of stupid if you ask me. 😏

#189465
Mar 20, 2018 7:23
Vote:
 

Yeah, I'm using a demo index. We have a "normal" index available in our test environment, so gonna try that one. Thanks!

And agree with the "stupid" part smile

#189469
Mar 20, 2018 8:11
Vote:
 

There is a bug that keeps you from using UsingSynonyms() before any InField() call. Bug FIND-2406 currently not public.

Try 

query = query.For(searchTerm, q =>
                {
                    q.Query = searchTerm;
                })
                    .InField(x => x.ItemName)
                    .AndInField(x => x.Code)
                    .AndInField(x => x.ParentCategoryNames)
                    .AndInField(x => x.ItemTradeMarkName)
                    .AndInField(x => x.ItemPrimaryVendorId)
                    .AndInField(x => x.ItemPc1VendorsitemId)
                    .AndInField(x => x.ItemEOProducer)
                    //.AndInField(x => x.ItemIngredience) //kommentert ut; SG-3276
                    .AndInField(x => x.ItemPc2AdvertisingText)
		    .UsingSynonyms();

                if (trackSearchTerm)
                {
                    query = query.Track();
                }



I am not aware of any restrictions on synonyms using demo indices.

#192337
May 15, 2018 14:24
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.