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.
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 -->
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?
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.
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.
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.
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())
]"/>
Indeed, that should work.
Your content tree looks something like this, right?
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.
Yes that is correct all except the news items.
My node tree looks like this:
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.
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.
No problem, Jerker! Glad it's all sorted out. I figured it must be a simple thing :)
cheers,
doug.
is working on a reply...