jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: Query Performance and Optimization
Date Mon, 19 Mar 2007 08:13:20 GMT
Christoph Kiehl wrote:
> Marcel Reutegger wrote:
> 
>>> Wouldn't it make sense to rewrite all @foo:bar!='john' queries to 
>>> not(@foo:bar!='john') by default instead of using creating a 
>>> MatchAllQuery?
>>
>> do you mean rewrite: @foo:bar!='john' to not(@foo:bar='john') ?
> 
> Yes, of course. My mistake. Do you think that's an option?

no I don't, because those are not equivalent. while @foo:bar!='john' only 
matches those nodes that *have* a @foo:bar property with a value not equal to 
'john', not(@foo:bar='john') in addition also matches all nodes which do not 
even have a @foo:bar property.

not(@foo:bar='john') and @foo:bar

is equivalent to @foo:bar!='john'. at least from a result perspective. the 
lucene queries that are executed are probably not the same.

regards
  marcel

Mime
View raw message