Copied to clipboard

Flag this post as spam?

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


  • Jerker Stigsson 63 posts 122 karma points
    Aug 30, 2013 @ 10:13
    Jerker Stigsson
    0

    XSLTsearch doesnt search all descendent nodes

    I have a site with a kind of ordinary documenttype for common pages and I also have some documenttypes for news and for categorizing the news.

    XSLTsearch searches the ordinary pages but not the documentypes for the news.

    All is placed bellow the only rootnode and I have set the rootnode as a search source.

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Aug 30, 2013 @ 10:29
    Douglas Robar
    0

    Can you show us the parameters you have for the xsltsearch macro? Do you have anything listed in the searchFields="" parameter? You should have a list of document type property aliases to search within. Otherwise XSLTsearch will default to looking at the pagename and the bodytext fields but no other properties. I suspect that's the issue. Have a look at the documentation PDF for more details as the order of the properties in the searchFields= macro parameter will make a difference to the ranking of search results.

    cheers,
    doug.

  • Jerker Stigsson 63 posts 122 karma points
    Aug 30, 2013 @ 10:57
    Jerker Stigsson
    0

    To make it simple to start with I have @nodeName and bodyText. And all of my documentTypes has a bodyText property.

    But then I actually had  set the landingpage for a list of news to umbracoNaviHide to true. And all news are children nodes to that news landingpage. So I switched the umbracoNaviHide to false. But it still doesnt search the news children nodes.

    In the xslt code I found this part and I think that my news nodes should match this filter.

    <!-- reduce the number of nodes for applying all the functions in the next step -->

        <xsl:variable name="possibleNodes" select="$items/descendant-or-self::*[

                                 @isDoc

                                 and string(umbracoNaviHide) != '1'

                                 and count(attribute::id)=1 

                                 and (umbraco.library:IsProtected(@id, @path) = false()

                                  or umbraco.library:HasAccess(@id, @path) = true())

                               ]"/>

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Aug 30, 2013 @ 11:07
    Douglas Robar
    0

    Indeed, that should work.

    Your content tree looks something like this, right?

    CONTENT  
    - Home  
    - - Some pages  
    - - More pages  
    - - News  
    - - - item 1  
    - - - item 2  
    - - Search
    

    And the search page's template has the XSLTsearch macro on it, with source="1234" (where 1234 if the id of the Home page), correct? Or the parameter is source="-1"? But not source=""? (I ask because there is a bug in recent version of Umbraco where not specifying the source no longer works if the search page is hidden)

    And you can search for titles of all pages except the news items?

    Is that correct?

    cheers,
    doug.

  • Jerker Stigsson 63 posts 122 karma points
    Aug 30, 2013 @ 11:36
    Jerker Stigsson
    0

    Yes that is correct all except the news items.

    My node tree looks like this:

    • Home
      • Some pages
      • More pages
      • News
        • Year
          • Month
            • item 1
            • item 2
      • Search
  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Aug 30, 2013 @ 12:11
    Douglas Robar
    0

    That is extremely odd.

    No problem with the Year and Month folders assuming they aren't hidden with the umbracoNaviHide property, which I wouldn't expect.

    The news items are truly published, right? Does it make any difference if you right-click on the Home page and select the 'Publish' menu item and publish it and all its children including unpublished ones? While you're at it, right-click on the CONTENT node at the very top above the Home page and republish that as well, which will forceably refresh the cache that XSLTsearch works with. Any change?

    If not, would it be possible for me to log into your site and have a look? It must be something simple that is escaping us.

    cheers,
    doug.

  • Jerker Stigsson 63 posts 122 karma points
    Aug 30, 2013 @ 12:52
    Jerker Stigsson
    0

    I'm so sorry taking your time! But thanks for your help.

    The specific search word I tested, that I knew existed in the news pages, that news page where it existed had set the umbracoNaviHide to true.

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Aug 30, 2013 @ 12:55
    Douglas Robar
    0

    No problem, Jerker! Glad it's all sorted out. I figured it must be a simple thing :)

    cheers,
    doug.

Please Sign in or register to post replies

Write your reply to:

Draft