Copied to clipboard

Flag this post as spam?

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


  • Ranjit J. Vaity 66 posts 109 karma points
    Mar 02, 2010 @ 19:00
    Ranjit J. Vaity
    0

    XSLT - Search only goes LEVEL 1 and 2

    Hi, 

    We are using XSLT search provided by Umbraco. We have a issue here, XSLT only searches level One and Two. We need to go further and search till the last node. Below is the code we are using....

    <h1 class="first"><umbraco:Item runat="server" field="pageName"/></h1>

    <div>

    <umbraco:Macro runat="server" Alias="XSLTsearch"

    macroAlias="XSLTsearch"

    source="-1"

    searchFields="@nodeName,metaKeywords,bodyText,metaDescription,address1,address2,city,street,landmark,description"

    previewFields="bodyText,metaDescription"

    previewType="beginning"

    searchBoxLocation="bottom"

    resultsPerPage="5"

    previewChars="255"

    showPageRange="1"

    showOrdinals="0"

    showScores="0"

    showStats="1">

    </umbraco:Macro>

    </div>

    Any help or advice is appriciated.
    Thanks in Advance
    Ranjit J. Vaity

  • Amir Khan 1282 posts 2739 karma points
    Mar 02, 2010 @ 19:13
    Amir Khan
    0

    I believe if you leave the "source" parameter blank, it searches from the root node all the way down to the bottom.

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Mar 02, 2010 @ 19:32
    Douglas Robar
    0

    Source="-1" will also search "all nodes" so that's not the problem.

    I suspect you have an 'umbracoNaviHide' property set on a node and thus it (and it's children) are not searched. Or you need to add the appropriate docType properties to the searchFields= parameter.

    You can read about the details of all the parameters and how to hide results from the search from the full documentation pdf available at http://our.umbraco.org/projects/xsltsearch.

    cheers,
    doug.

  • Ranjit J. Vaity 66 posts 109 karma points
    Mar 04, 2010 @ 10:00
    Ranjit J. Vaity
    0

    Hi Douglas and Amir,

    Thanks for your help the issue is been resolved.

    Actually in searchFields parameter, I had one property name which was not required in search criteria(keyed in error).

    I guess XSLT ignored the list of field for beyond that property name for searching.

    Once I removed that wrongly entered one. XSLTSearch worked fine.

     

    Many Thanks for suggestions. :)

    Regards,

    Ranjit J. Vaity

Please Sign in or register to post replies

Write your reply to:

Draft