Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bobi 352 posts 956 karma points
    Mar 30, 2017 @ 18:19
    Bobi
    1

    ez search not working with all property aliases

    Hi,

    I'm experiencing an issue with listing property aliases in the searchFields and previewFields of the macro. I have two questions / concerns:

    (1) Is there a general catch-all I can include in the macro for the searchFields and previewFields so that all of my property aliases are included, rather than listing all of them (tedious).

    (2) It appears that my below macro is not giving all results with the search term: "experience". I have at least 8 property aliases that contain content with the word "experience", but since my previewFields are listed in order, it looks like it leaves out the later property aliases that would contain the word: "experience".

    My macro:

    @Umbraco.RenderMacro("ezSearch", new {rootContentNodeId="1052", rootMediaNodeId="", indexType="BOTH", searchFields= "nodeName, metaTitle, metaDescription, metaKeywords, bodyText, textString1, textString2, textString3, textString4, textString5, textString6, textString7, textString8, textString9, textString10, textString11, textString12, textString13, textString14, textString15, textString16, textString17, textString18, textString19, textString20, richText1, richText2, richText3, richText4, richText5, richText6, richText7, richText8, richText9, richText10, richText11", previewFields= "nodeName, metaTitle, metaDescription, metaKeywords, bodyText, richText1, richText2, richText3, richText4, richText5, richText6, richText7, richText8, richText9, richText10, richText11, textString1, textString2, textString3, textString4, textString5, textString6, textString7, textString8, textString9, textString10, textString11, textString12, textString13, textString14, textString15, textString16, textString17, textString18, textString19, textString20", previewLength="381", pageSize="10", hideFromSearchField="", searchFormLocation="NONE"})

    I don't know if this matters, but I commented out the following:

    // ==================================================== // Comment the next if statement out if you want a root // node id of -1 to search content across all sites // and not just the current site. // ==================================================== @if (model.RootContentNodeId <= 0) { model.RootContentNodeId = Model.Content.AncestorOrSelf(1).Id; }@

Please Sign in or register to post replies

Write your reply to:

Draft