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

Reply via email to