none
How can I search based on taxonomy crawled property using GUID and with exact match not contains? RRS feed

  • Question

  • Hi All,

    I created one search rest call and able get the relevant items. Below is the example.

    http://somesite/Search/_api/search/query?querytext='*'&querytemplate='({searchterms}  owstaxIdPublicationx0020Audiencex0020Businessx0020Unit:cdaf2522-40f7-40e1-a9b6-5870c45b8246)'&sourceid='af9787e4-5452-4110-8604-8c5d288c309b'&selectproperties='Title,OriginalPath,owstaxIdPublicationx0020Audiencex0020Location,owstaxIdPublicationx0020Audiencex0020Businessx0020Unit'&refinementfilters='ShowAsGlobalDropdownOWSBOOL:equals("1")'&rowlimit=50

    Problem:

    It returns the items where I have tagged a page with parent taxonomy and also returning pages which has been tagged with child taxonomy. I don't want that pages where child terms has been tagged. Above call is looking for pages that contains "cdaf2522-40f7-40e1-a9b6-5870c45b8246" GUID against the crawled property which is owstaxIdPublicationx0020Audiencex0020Businessx0020Unit).

    However, the pages tagged with child taxonomy also having reference of parent GUID in taxonomy field as below

    GP0|#8658af9a-ba6e-4905-bf57-8009c03ad4c6;L0|#08658af9a-ba6e-4905-bf57-8009c03ad4c6|Global Client Network;GTSet|#46a45dbf-f2c3-479d-a151-b9041fdaa80e;GPP|#e706f291-7a53-4e4f-ae11-2b311cfc383d;GPP|#cdaf2522-40f7-40e1-a9b6-5870c45b8246

    So is there any way to apply exact match on lookup/metadata property in SharePoint Search rest API.

    Thanks in advance

    Regards

    Shubham 



    Tuesday, June 9, 2015 1:51 PM

All replies

  • as you can see the term of the item itseld is duplicated with a zero before it, therefor in your search query add the zero before.

    GP0|#8658af9a-ba6e-4905-bf57-8009c03ad4c6;L0|#08658af9a-ba6e-4905-bf57-8009c03ad4c6|Global Client Network;GTSet|#46a45dbf-f2c3-479d-a151-b9041fdaa80e;GPP|#e706f291-7a53-4e4f-ae11-2b311cfc383d;GPP|#cdaf2522-40f7-40e1-a9b6-5870c45b8246


    Wednesday, December 30, 2015 5:52 PM