Last modified: 2013-04-01 15:00:46 UTC
I've created a testcase page here: https://wiki.mozilla.org/User:Dria/SMWdisjunctionbug I was expecting using "OR" and "||" to return the same results in this situation, but while OR behaves as expected, the "||" version returns results as if there were wildcards involved: {{#ask: [[Category:Feature Page]] [[Feature security status::tbd]] OR [[Feature security status::-]] | ? | ?Feature security status# | sort=Feature priority | format=table | limit=500 }} {{#ask: [[Category:Feature Page]] [[Feature security status::tbd||-]] | ? | ?Feature security status# | sort=Feature priority | format=table | limit=500 }} I may misunderstand how the "||" is supposed to work, but the documentation suggests that these should return the same results.
I confirmed the issue, and it seems to be still present on trunk. But instead of getting the pages that should not match, I'm getting [[:smw:|]]. I had a look at the code, but did not find the cause of the issue.
To clarify my own report: I have pages Foo, Bar and Haz, with a property Has number with values 1, 2 and 3, respectively. This query {{ #Ask: [[Has number::1]] OR [[Has number::2]] }} Result into the expected: Bar, Foo While this one {{ #Ask: [[Has number::1||2]] }} Result into: [[:smw:|]], Bar, Foo
I have an other description for the || Disjunction bug. Consider the two property : Title , Author We search all page containing Title tag : 'foo' made by Author : 'Luc' or 'Alex' [[Title::~*foo*]][[Author::Luc||Alex]] and [[Author::Luc||Alex]][[Title::~*foo*]] Do not give the same results, we expect those two being equivalent, such as : [[Title::~*foo*][[Author::Luc]] OR [[Title::~*foo*][[Author::Alex]] The Query : [[Author::Luc||Alex]][[Title::~*foo*]] does exactly this : [[Author::Luc]] OR [[Author::Alex]][[Title::~*foo*]] The invert is also true : [[Author::Alex||Luc]][[Title::~*foo*]] does : [[Author::Alex]] OR [[Author::Luc]][[Title::~*foo*]] The Query: [[Title::~*foo*]][[Author::Luc||Alex]] Gives results correctly.
I believe I have found a similar problem. In my case, the query {{#ask:[[Full Title::+]][[Full Title::~a*||~A*]] . . . gives the correct results (a case-insensitive search for items with Full Title starting with the letter 'A'). However, the following query {{#ask:[[Full Title::+]][[Full Title::~A*||~a*]] . . . seems to ignore the second query term completely, returning all items with a value for the Full Title property regardless of what letter they begin with. I did a little bit more digging and discovered that in my case, there were no items with a Full Title that begin with lowercase a. For another data set that had Full Title starting with both uppercase A and lowercase a, both queries returned the correct resuts. So, it appears that if the condition after the || returns no results, the entire query term is ignored.