From b138c00af80782c493347a3bb6248b9aeaead634 Mon Sep 17 00:00:00 2001 From: Adam Retter Date: Tue, 9 May 2023 18:07:05 +0200 Subject: [PATCH] [test] Fix the tests --- exist-core/src/test/xquery/indexing/range.xml | 22 +++---- .../src/test/xquery/optimizer/expressions.xqm | 66 +++++++++---------- .../src/test/xquery/optimizer/positional.xqm | 32 ++++----- .../lucene/src/test/xquery/lucene/queries.xml | 10 +-- 4 files changed, 65 insertions(+), 65 deletions(-) diff --git a/exist-core/src/test/xquery/indexing/range.xml b/exist-core/src/test/xquery/indexing/range.xml index 6fc3c6c8ba7..a4f1759ffae 100644 --- a/exist-core/src/test/xquery/indexing/range.xml +++ b/exist-core/src/test/xquery/indexing/range.xml @@ -78,35 +78,35 @@ Test empty element content doc("/db/test/text1.xml")//a[. = 'A1'] - //prof:index[@type = 'range'][@optimization = 2] + //prof:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED'] Test empty element content doc("/db/test/text1.xml")//a[. = ''] - //prof:index[@type = 'range'][@optimization = 2] + //prof:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED'] Simple query on xs:integer doc("/db/test/text1.xml")//b[. = 1] - //prof:index[@type = 'range'][@optimization = 2] + //prof:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED'] Greater than on xs:integer doc("/db/test/text1.xml")//b[. > 1] - //prof:index[@type = 'range'][@optimization = 2] + //prof:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED'] Greater than on xs:string doc("/db/test/text1.xml")//b[. > "1"] - //prof:index[@type = 'range'][@optimization = 2] + //prof:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED'] @@ -119,42 +119,42 @@ Greater than on xs:double doc("/db/test/text1.xml")//c[. > xs:integer(1)] - //prof:index[@type = 'range'][@optimization = 2] + //prof:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED'] Greater than on xs:double doc("/db/test/text1.xml")//c[. > 1.0] - //prof:index[@type = 'range'][@optimization = 2] + //prof:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED'] Lookup xs:integer doc("/db/test/text1.xml")//d[. = 20] - //prof:index[@type = 'range'][@optimization = 2] + //prof:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED'] Lookup xs:double on element containing numbers and strings doc("/db/test/text1.xml")//e[. = 50.0] - //prof:index[@type = 'range'][@optimization = 2] + //prof:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED'] Compare xs:double on element containing numbers and strings doc("/db/test/text1.xml")//e[. > 50.0] - //prof:index[@type = 'range'][@optimization = 2] + //prof:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED'] Query inside document constructor document { doc("/db/test/text1.xml")//b[. = 1] } - //prof:index[@type = 'range'][@optimization = 2] + //prof:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED'] diff --git a/exist-core/src/test/xquery/optimizer/expressions.xqm b/exist-core/src/test/xquery/optimizer/expressions.xqm index 0e1ed1fc309..895108528ea 100755 --- a/exist-core/src/test/xquery/optimizer/expressions.xqm +++ b/exist-core/src/test/xquery/optimizer/expressions.xqm @@ -89,7 +89,7 @@ function ot:cleanup() { declare %test:stats %test:args("Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-simple-comparison($name as xs:string) { collection($ot:COLLECTION)//address[name = $name]/city/text() }; @@ -97,7 +97,7 @@ function ot:optimize-simple-comparison($name as xs:string) { declare %test:stats %test:args("Rüsselsheim") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 0]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'NONE']") function ot:no-optimize-simple-comparison($name as xs:string) { collection($ot:COLLECTION)//address[city = $name]/city/text() }; @@ -105,7 +105,7 @@ function ot:no-optimize-simple-comparison($name as xs:string) { declare %test:stats %test:args("Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-filter-context-step($name as xs:string) { collection($ot:COLLECTION)//(address)[name = $name]/city/text() }; @@ -113,7 +113,7 @@ function ot:optimize-filter-context-step($name as xs:string) { declare %test:stats %test:args("Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-sequence($name as xs:string) { (collection($ot:COLLECTION)//address[name = $name]/city/text(), "xxx") }; @@ -121,7 +121,7 @@ function ot:optimize-sequence($name as xs:string) { declare %test:stats %test:args("Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-let($name as xs:string) { let $city := collection($ot:COLLECTION)//address[name = $name]/city/text() return @@ -131,7 +131,7 @@ function ot:optimize-let($name as xs:string) { declare %test:stats %test:args("Rüsselsheim") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 0]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'NONE']") function ot:no-optimize-let($name as xs:string) { let $city := collection($ot:COLLECTION)//address[city = $name]/city/text() return @@ -141,7 +141,7 @@ function ot:no-optimize-let($name as xs:string) { declare %test:stats %test:args("Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-for($name as xs:string) { for $city in collection($ot:COLLECTION)//address[name = $name]/city/text() return @@ -151,7 +151,7 @@ function ot:optimize-for($name as xs:string) { declare %test:stats %test:args("Rüsselsheim") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 0]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'NONE']") function ot:no-optimize-for($name as xs:string) { for $city in collection($ot:COLLECTION)//address[city = $name]/city/text() return @@ -161,7 +161,7 @@ function ot:no-optimize-for($name as xs:string) { declare %test:stats %test:args("Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-if-then($name as xs:string) { if (1 = 1) then collection($ot:COLLECTION)//address[name = $name]/city/text() @@ -172,7 +172,7 @@ function ot:optimize-if-then($name as xs:string) { declare %test:stats %test:args("Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-if-else($name as xs:string) { if (1 = 2) then () @@ -191,7 +191,7 @@ declare %private function ot:find-by-city($name as xs:string) { declare %test:stats %test:args("Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-function-call($name as xs:string) { ot:find-by-name($name) }; @@ -199,7 +199,7 @@ function ot:optimize-function-call($name as xs:string) { declare %test:stats %test:args("Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:no-optimize-function-call($name as xs:string) { ot:find-by-name($name) }; @@ -207,7 +207,7 @@ function ot:no-optimize-function-call($name as xs:string) { declare %test:stats %test:args("Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-try($name as xs:string) { try { collection($ot:COLLECTION)//address[name = $name]/city/text() @@ -219,7 +219,7 @@ function ot:optimize-try($name as xs:string) { declare %test:stats %test:args("Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-catch($name as xs:string) { try { xs:int("abc") @@ -231,7 +231,7 @@ function ot:optimize-catch($name as xs:string) { declare %test:stats %test:args("Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-attribute-enclosed($name as xs:string) { }; @@ -239,7 +239,7 @@ function ot:optimize-attribute-enclosed($name as xs:string) { declare %test:stats %test:args("Rüsselsheim") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 0]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'NONE']") function ot:no-optimize-attribute-enclosed($name as xs:string) { }; @@ -247,7 +247,7 @@ function ot:no-optimize-attribute-enclosed($name as xs:string) { declare %test:stats %test:args("Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-element-enclosed($name as xs:string) { {collection($ot:COLLECTION)//address[name = $name]/city/text()} }; @@ -255,7 +255,7 @@ function ot:optimize-element-enclosed($name as xs:string) { declare %test:stats %test:args("Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-element-dynamic-enclosed($name as xs:string) { element a { collection($ot:COLLECTION)//address[name = $name]/city/text() @@ -265,7 +265,7 @@ function ot:optimize-element-dynamic-enclosed($name as xs:string) { declare %test:stats %test:args("Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-attribute-dynamic-enclosed($name as xs:string) { { @@ -279,7 +279,7 @@ function ot:optimize-attribute-dynamic-enclosed($name as xs:string) { declare %test:stats %test:args("Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-inline-function($name as xs:string) { let $f := function() { collection($ot:COLLECTION)//address[name = $name]/city/text() @@ -291,7 +291,7 @@ function ot:optimize-inline-function($name as xs:string) { declare %test:stats %test:args("Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-inline-function-enclosed-attribute($name as xs:string) { let $f := function() { collection($ot:COLLECTION)//address[name = $name]/city/text() @@ -303,7 +303,7 @@ function ot:optimize-inline-function-enclosed-attribute($name as xs:string) { declare %test:stats %test:args("Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-inline-function-enclosed($name as xs:string) { let $f := function() { collection($ot:COLLECTION)//address[name = $name]/city/text() @@ -315,7 +315,7 @@ function ot:optimize-inline-function-enclosed($name as xs:string) { declare %test:stats %test:args("Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-function-reference($name as xs:string) { let $f := ot:find-by-name#1 return @@ -325,7 +325,7 @@ function ot:optimize-function-reference($name as xs:string) { declare %test:stats %test:args("Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-function-map($name as xs:string) { let $f := ot:find-by-name#1 return @@ -335,7 +335,7 @@ function ot:optimize-function-map($name as xs:string) { declare %test:stats %test:args("Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-function-partial($name as xs:string) { let $f1 := function($foo, $name) { ot:find-by-name($name) @@ -348,11 +348,11 @@ function ot:optimize-function-partial($name as xs:string) { declare %test:stats %test:args(1, "Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") %test:args(2, "Rüsselsheim") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 0]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'NONE']") %test:args(3, "Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-switch($case as xs:integer, $name as xs:string) { switch($case) case 1 return @@ -366,11 +366,11 @@ function ot:optimize-switch($case as xs:integer, $name as xs:string) { declare %test:stats %test:args("", "Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") %test:args("", "Rüsselsheim") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 0]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'NONE']") %test:args("", "Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-typeswitch($case as element(), $name as xs:string) { typeswitch($case) case element(a) return @@ -384,7 +384,7 @@ function ot:optimize-typeswitch($case as element(), $name as xs:string) { declare %test:stats %test:args("Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-map($name as xs:string) { let $map := map { "key": collection($ot:COLLECTION)//address[name = $name]/city/text() @@ -396,7 +396,7 @@ function ot:optimize-map($name as xs:string) { declare %test:stats %test:args("Rudi Rüssel") - %test:assertXPath("$result//stats:index[@type = 'range'][@optimization = 2]") + %test:assertXPath("$result//stats:index[@type eq 'range'][@optimization-level eq 'OPTIMIZED']") function ot:optimize-map-entry($name as xs:string) { let $map := map:entry( "key", collection($ot:COLLECTION)//address[name = $name]/city/text() diff --git a/exist-core/src/test/xquery/optimizer/positional.xqm b/exist-core/src/test/xquery/optimizer/positional.xqm index 67734efe6a4..cdbbcd37fb0 100644 --- a/exist-core/src/test/xquery/optimizer/positional.xqm +++ b/exist-core/src/test/xquery/optimizer/positional.xqm @@ -106,7 +106,7 @@ function ot:simple-following() { declare %test:stats - %test:assertXPath("$result//stats:optimization[@type = 'PositionalPredicate']") + %test:assertXPath("$result//stats:optimization[@type eq 'POSITIONAL_PREDICATE']") function ot:optimize-simple-following() { let $w := doc($ot:DOC)//w[@xml:id='25000'] return @@ -123,7 +123,7 @@ function ot:simple-following-node() { declare %test:stats - %test:assertXPath("$result//stats:optimization[@type = 'PositionalPredicate']") + %test:assertXPath("$result//stats:optimization[@type eq 'POSITIONAL_PREDICATE']") function ot:optimize-simple-following-node() { let $w := doc($ot:DOC)//w[@xml:id='25000'] return @@ -132,7 +132,7 @@ function ot:optimize-simple-following-node() { declare %test:stats - %test:assertXPath("$result//stats:optimization[@type = 'PositionalPredicate']") + %test:assertXPath("$result//stats:optimization[@type eq 'POSITIONAL_PREDICATE']") function ot:optimize-simple-following-in-for() { let $w := doc($ot:DOC)//w[@xml:id='25000'] for $i in 1 to 3 @@ -150,7 +150,7 @@ function ot:simple-following-text() { declare %test:stats - %test:assertXPath("$result//stats:optimization[@type = 'PositionalPredicate']") + %test:assertXPath("$result//stats:optimization[@type eq 'POSITIONAL_PREDICATE']") function ot:optimize-simple-following-text() { let $w := doc($ot:DOC)//w[@xml:id='25000'] return @@ -167,7 +167,7 @@ function ot:simple-following-nested() { declare %test:stats - %test:assertXPath("$result//stats:optimization[@type = 'PositionalPredicate']") + %test:assertXPath("$result//stats:optimization[@type eq 'POSITIONAL_PREDICATE']") function ot:optimize-simple-following-nested() { let $w := doc($ot:DOC_NESTED)/test/*[1]/w[@xml:id='20'] return @@ -176,7 +176,7 @@ function ot:optimize-simple-following-nested() { declare %test:stats - %test:assertXPath("not($result//stats:optimization[@type = 'PositionalPredicate'])") + %test:assertXPath("not($result//stats:optimization[@type eq 'POSITIONAL_PREDICATE'])") function ot:optimize-simple-preceding() { let $w := doc($ot:DOC)//w[@xml:id='25000'] return @@ -185,7 +185,7 @@ function ot:optimize-simple-preceding() { declare %test:stats - %test:assertXPath("not($result//stats:optimization[@type = 'PositionalPredicate'])") + %test:assertXPath("not($result//stats:optimization[@type eq 'POSITIONAL_PREDICATE'])") function ot:optimize-simple-preceding-sibling() { let $w := doc($ot:DOC)//w[@xml:id='25000'] return @@ -194,7 +194,7 @@ function ot:optimize-simple-preceding-sibling() { declare %test:stats - %test:assertXPath("$result//stats:optimization[@type = 'PositionalPredicate']") + %test:assertXPath("$result//stats:optimization[@type eq 'POSITIONAL_PREDICATE']") function ot:optimize-simple-following-sibling() { let $w := doc($ot:DOC)//w[@xml:id='25000'] return @@ -203,7 +203,7 @@ function ot:optimize-simple-following-sibling() { declare %test:stats - %test:assertXPath("$result//stats:optimization[@type = 'PositionalPredicate']") + %test:assertXPath("$result//stats:optimization[@type eq 'POSITIONAL_PREDICATE']") function ot:optimize-following-multiple-filters() { let $w := doc($ot:DOC)//w[@xml:id='25000'] return @@ -212,7 +212,7 @@ function ot:optimize-following-multiple-filters() { declare %test:stats - %test:assertXPath("$result//stats:optimization[@type = 'PositionalPredicate']") + %test:assertXPath("$result//stats:optimization[@type eq 'POSITIONAL_PREDICATE']") function ot:optimize-following-filter-with-operator() { let $w := doc($ot:DOC)//w[@xml:id='25000'] for $i in 1 to 5 @@ -222,7 +222,7 @@ function ot:optimize-following-filter-with-operator() { declare %test:stats - %test:assertXPath("$result//stats:optimization[@type = 'PositionalPredicate']") + %test:assertXPath("$result//stats:optimization[@type eq 'POSITIONAL_PREDICATE']") function ot:optimize-following-filter-with-operator2() { let $w := doc($ot:DOC)//w[@xml:id='25000'] for $i in 1 to 5 @@ -241,7 +241,7 @@ function ot:optimize-following-filter-with-at() { declare %test:stats - %test:assertXPath("not($result//stats:optimization[@type = 'PositionalPredicate'])") + %test:assertXPath("not($result//stats:optimization[@type eq 'POSITIONAL_PREDICATE'])") function ot:no-optimize-following-filter-with-function() { let $w := doc($ot:DOC)//w[@xml:id='25000'] let $i := 1 @@ -252,7 +252,7 @@ function ot:no-optimize-following-filter-with-function() { declare %test:stats - %test:assertXPath("$result//stats:optimization[@type = 'PositionalPredicate']") + %test:assertXPath("$result//stats:optimization[@type eq 'POSITIONAL_PREDICATE']") function ot:optimize-following-filter-with-function() { let $w := doc($ot:DOC)//w[@xml:id='25000'] return @@ -261,7 +261,7 @@ function ot:optimize-following-filter-with-function() { declare %test:stats - %test:assertXPath("not($result//stats:optimization[@type = 'PositionalPredicate'])") + %test:assertXPath("not($result//stats:optimization[@type eq 'POSITIONAL_PREDICATE'])") function ot:optimize-following-filter-position() { let $w := doc($ot:DOC)//w[@xml:id='25000'] return @@ -270,7 +270,7 @@ function ot:optimize-following-filter-position() { declare %test:stats - %test:assertXPath("not($result//stats:optimization[@type = 'PositionalPredicate'])") + %test:assertXPath("not($result//stats:optimization[@type eq 'POSITIONAL_PREDICATE'])") function ot:optimize-following-filter-last() { let $w := doc($ot:DOC)//w[@xml:id='25000'] return @@ -279,7 +279,7 @@ function ot:optimize-following-filter-last() { declare %test:stats - %test:assertXPath("not($result//stats:optimization[@type = 'PositionalPredicate'])") + %test:assertXPath("not($result//stats:optimization[@type eq 'POSITIONAL_PREDICATE'])") function ot:optimize-following-nested-filter() { doc($ot:DOC)//w[@xml:id='25000'][following::*[1] = "25001"] }; diff --git a/extensions/indexes/lucene/src/test/xquery/lucene/queries.xml b/extensions/indexes/lucene/src/test/xquery/lucene/queries.xml index 965de6b46f2..b5d7f8eabf0 100644 --- a/extensions/indexes/lucene/src/test/xquery/lucene/queries.xml +++ b/extensions/indexes/lucene/src/test/xquery/lucene/queries.xml @@ -403,27 +403,27 @@ Query test: optimizer test, query on element doc("/db/lucene/text1.xml")//p[ft:query(b, "neun")] - $output/stats:index[@type = 'lucene']/@optimization = 2 + $output/stats:index[@type eq 'lucene']/@optimization-level eq 'OPTIMIZED' Query test: optimizer test, query on self doc("/db/lucene/text1.xml")//p[ft:query(., "acht")] - $output/stats:index[@type = 'lucene']/@optimization = 2 + $output/stats:index[@type eq 'lucene']/@optimization-level eq 'OPTIMIZED' Query test: optimizer test, query on wildcard doc("/db/lucene/text1.xml")/test[ft:query(*, "acht")] - $output/stats:index[@type = 'lucene']/@optimization = 2 + $output/stats:index[@type eq 'lucene']/@optimization-level eq 'OPTIMIZED' Optimizer test: wildcard context, self/descendant doc("/db/lucene/text1.xml")//x[ft:query(.//*, "nodes")] - $output/stats:index[@type = 'lucene']/@optimization = 2 + $output/stats:index[@type eq 'lucene']/@optimization-level eq 'OPTIMIZED' Optimizer test: wildcard context, long path doc("/db/lucene/text1.xml")//x[ft:query(./y/*, "nodes")] - $output/stats:index[@type = 'lucene']/@optimization = 2 + $output/stats:index[@type eq 'lucene']/@optimization-level eq 'OPTIMIZED' Phrase highlighting 1