Hi Christoph,
Christoph Kiehl wrote:
I've created a jira issue: http://issues.apache.org/jira/browse/JCR-791
Are you working on this issue? Or should I try to implement something?
I just started working on it ;)
Actually it's /foo/[EMAIL PROTECTED]:bar!='john']
ah, yes. that makes sense.
@foo:bar='john' should be translated into a term query.
You are right. "="-comparisons translate into term queries whereas
"!="-comparisons gets translated into MatchAllQueries.
It seems like if I rewrite the following query from
/foo/[EMAIL PROTECTED]:bar!='john' and @foo:bar!='doe']
to
/foo/*[not(@foo:bar='john' or @foo:bar='doe')]
I get a better performance. Can you confirm this?
Yes, I can. Basically because any != comparison is translated into: get all
nodes with the given property, then exclude the ones that match the literal.
Which is obviously much more expensive than just: get all nodes that match a
given literal.
regards
marcel