Azure Facets merging? RRS feed

  • Question

  • I have two requirements in .net.

    1st is to merge two different azure facets into one facet using .net code, please help with the code. eg:

    var facets = Model.SearchResponse.Facets ;
        var facets1 = Model.SearchResponse1.Facets;
        var facets2 = addition of facets and facets1;

    2nd is not sure what's going wrong.

    Highlight is not working for second keyword with the search results.


    searchParams.HighlightFields =  "Contactname";    
     searchParams.HighlightPreTag = "<mark>";
     searchParams.HighlightPostTag = "</mark>";

    ---> If I enter search text as "Johnson" then it does not highlight for searh result "Bob Johnson" --> this is contact name "Johnson" should be highlighted, however if I enter search text as "Bob Johnson" then it works for contact who's first word start with "Bob" in short the 1st word of search keyword matches with 1st word of search results.

    I want the 2nd keyword should also be highlighted with any search results text, please help me with the .net code.

    Wednesday, September 7, 2016 5:49 AM


  • Hi harshu288,

    Thank you for posting here.

    1st is to merge two different azure facets into one facet using .net code, please help with the code. eg:

    As far as I know the facet is query parameter.  It is not query input. For each facet query parameter you

    provide, Azure Search will evaluate how many documents are in the partial results for each facet value.

    Based on my search. I think we cannot merge two facets into one. 

    Since your issue is related to azure forum. I would suggest you repost azure forum. I will move the thread to off-topic forum.

    For more information, please see How to implement faceted navigation in Azure Search

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    • Proposed as answer by Hart Wang Friday, September 9, 2016 9:14 AM
    • Edited by Hart Wang Tuesday, September 13, 2016 3:04 AM
    • Marked as answer by DotNet WangModerator Wednesday, September 21, 2016 3:48 AM
    Thursday, September 8, 2016 2:31 AM