开发者

'and' terms not reversible in Sitecore Fast Query?

开发者 https://www.devze.com 2023-01-20 00:15 出处:网络
This one may be a bug, or it may be me failing to understand something. Assuming there are some named \'Profile\' items inside /sitecore/system/marketing center/profiles, this query returns all of th

This one may be a bug, or it may be me failing to understand something.

Assuming there are some named 'Profile' items inside /sitecore/system/marketing center/profiles, this query returns all of them (tested in XPath Builder):

fast:/sitecore/system/marketing center/profiles/*[@Name='%' and @@templatename='Profile']

But if I reverse the two predicates, I get no results. That's this que开发者_StackOverflow中文版ry:

fast:/sitecore/system/marketing center/profiles/*[@@templatename='Profile' and @Name='%']

Each of the predicates works separately, giving correct results to my eyes.

I wasted several hours on this today hunting this bug down in a Lucene indexer (Man, I hate it when I'm right).

Any clues on why this only works one way around and how to avoid stumbling on it in the future?


This is a known issue with Fast Query in 6.1/6.2. If there are more than 1 predicate and @@templatename goes first, it brakes the query. I double checked - this should be addressed in 6.3. I will talk to the documentation folks to get this included into the known issue list. Sorry for the inconvenience.

0

精彩评论

暂无评论...
验证码 换一张
取 消