Sandun Perera
Sandun Perera

Reputation: 571

Sitecore query not returning results for level 9 items

My sitecore item hierarchy is like this,

/sitecore/content/Public/level1/level2/level3/Item1/Images/Image1

I tried following query in X-Path builder /sitecore/content/Public/level1/level2/level3/Item1/Images/Image1/* Does not return any result...

but, 1 level above returns results, (All images Image1, Image 2 etc.) /sitecore/content/Public/level1/level2/level3/Item1/Images/*

Following returned Image1 as well, /sitecore/content/Public/level1/level2/level3/Item1/Images//*

(Data and query executed in the master database)

Is this a sitecore query limitation where you can't query single items which has more that 8 levels?

Upvotes: 2

Views: 1260

Answers (2)

Martijn van der Put
Martijn van der Put

Reputation: 4082

Check the setting of the <setting name="Query.MaxItems" value="100" /> property in the web.config. It is standard set to return only the first 100 items. Raise the limit and see if this might have something to do with your issue.

Upvotes: 1

Kevin Brechb&#252;hl
Kevin Brechb&#252;hl

Reputation: 4727

I don't know about some restrictions and think this should work. Your query also looks ok. Are you sure that you have some items available under "Image1"? If you only have the described hierarchy with no childs under "Image1", then you won't get any items returned by the query.

Your last query (with //*) also say that only "Image1" is returned. Because the // defines a recursive query, also childs of "Image1" should be returned, if there are any.

Upvotes: 0

Related Questions