2
votes

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 query:

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?

1

1 Answers

2
votes

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.