Skip to main content

 locked
Multi-word synonyms in azure search RRS feed

  • Question

  • Hello,

    According to article https://azure.microsoft.com/pl-pl/blog/azure-search-synonyms-public-preview/ I should be to use multi-word/phrase synonym in synonymMaps

    "

    Multi-word synonyms

    In many full text search engines, support for synonyms is limited to single words. Our team has engineered a solution that allows Azure Search to support multi-word synonyms. This allows for phrase queries (“”) to function properly while using synonyms. If someone has mapped ‘hot tub’ to ‘whirlpool bath’ and they then search for “large hot tub,” Azure Search will return matches which contain both “large hot tub” and “large whirlpool bath.”

    "

    However, in my case I got match on subwords.

    My synonymMap looks like:

    {"name":"map",

    "format":"solr",

    "synonyms":"Gastroenterology (acute and chronic),vomiting, diarrhoea, weight loss\n"}

    And I have documents in search index which contains medicine disciplines like Gastroenterology (acute and chronic).

    What I receives after ?search="vomiting" is:

     {
                "@search.score": 1.0405536,
                "@search.highlights": {
                    "disciplines/name": [
                        "<em>Acute</em> <em>and</em> <em>chronic</em> ear disease",
                        "<em>Acute</em> <em>and</em> <em>chronic</em> skin disease",
                        "<em>Gastroenterology</em> (<em>acute</em> <em>and</em> <em>chronic</em>)",
                        "Haematology (<em>acute</em> <em>and</em> <em>chronic</em>)",
                        "Respiratory medicine (<em>acute</em> <em>and</em> <em>chronic</em>)"
                    ],

    And I am expecting:

    {
        "@search.score": 1.0405536,
        "@search.highlights": {
            "disciplines/services/translatedName": [
                "<em>Gastroenterology (acute and chronic)</em>",
            ],

    Am I doing sth wrong?

    Regards,

    Shohoo








    • Edited by Shohoo Tuesday, July 23, 2019 6:11 PM
    Tuesday, July 23, 2019 6:04 PM

All replies

  • Hi Shohoo, 

    Thanks for your question. Can you please post this question on Stack Overflow using the "Azure Search" tag? The Azure Search engineers monitor that platform closely and would be able to provide expert knowledge on your issue.

    Thanks,

    Grace
    Wednesday, July 24, 2019 11:01 PM
    Moderator
  • https://stackoverflow.com/questions/57199211/how-to-handle-multi-word-phrase-synonyms-in-azure-search

    Thank you Grace.

    Thursday, July 25, 2019 10:37 AM