2

I have a SharePoint 2013 portal running enterprise search. I have imported some thesaurus with the Import-SPEnterpriseSearchThesaurus cmdlet. For example, let's say as a test I have associated the string "ABCD" with "opportunities." When I search for "ABCD" in the search center site collection, I get several results where the string "opportunities" is hit-highlighted, which is the expected behavior.

If I execute a search with javascript over the REST interface in the form <myurl>/_api/search/query?querytext="ABCD", I get only results that match the actual string "ABCD," and nothing that contains "opportunities." It's as if the thesaurus terms were ignored when I execute the search over REST. I expect to get the same results that I get when I use the search center.

Is there anything I have to do to make this work? The REST interface is exposed anonymously, so I use a QueryTemplatePropertiesURL parameter, and I make the query over HTTP GET. For other searches (ones that do not rely on thesaurus terms), I get the same results back when I execute the query in REST vs. the web interface in the search center.

0

I have tested this and the Thesaurus is not called if the synonym is not exactly the same. Therefore ABCD will turn into Opportunities but if the name is Opportunities A, it will not find it. You also cannot call ABCD* to get Opportunities* as ABCD* != ABCD.

I am trying to find a way to add a star after the thesaurus is called but nothing so far.

just be careful as the first line is ignored as the file reads that one as the Header

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.