@@ -75,7 +75,7 @@ public void testWildcard() throws IOException, ParserConfigurationException, SAX
7575 assertXpathEvaluatesTo ("0026" , "string(//*[local-name()='result'][1]//*[local-name()='id'])" , resultDoc );
7676 assertXpathEvaluatesTo ("0012" , "string(//*[local-name()='result'][2]//*[local-name()='id'])" , resultDoc );
7777
78- String expectedSearchReport = "(cts:search(fn:collection(), cts:or-query((cts:element-value-query(fn:QName(\" \" ,\" id\" ), \" 00*2\" , (\" lang=en\" ), 1), cts:element-value-query(fn:QName(\" \" ,\" id\" ), \" 0??6\" , (\" lang=en\" ), 1))) , (\" score-logtfidf\" ), 1))[1 to 10]" ;
78+ String expectedSearchReport = "(cts:search(fn:collection(), cts:or-query((cts:element-value-query(fn:QName(\" \" ,\" id\" ), \" 00*2\" , (\" lang=en\" ), 1), cts:element-value-query(fn:QName(\" \" ,\" id\" ), \" 0??6\" , (\" lang=en\" ), 1)), ()) , (\" score-logtfidf\" ,cts:score-order( \" descending \" ) ), 1))[1 to 10]" ;
7979
8080 assertXpathEvaluatesTo (expectedSearchReport , "string(//*[local-name()='report'])" , resultDoc );
8181
@@ -121,7 +121,7 @@ public void testGoogleStyleGrammar() throws IOException, ParserConfigurationExce
121121 assertXpathEvaluatesTo ("0113" , "string(//*[local-name()='result'][1]//*[local-name()='id'])" , resultDoc );
122122 assertXpathEvaluatesTo ("0026" , "string(//*[local-name()='result'][2]//*[local-name()='id'])" , resultDoc );
123123
124- String expectedSearchReport = "(cts:search(fn:collection(), cts:or-query((cts:element-value-query(fn:QName(\" \" ,\" title\" ), \" The memex\" , (\" lang=en\" ), 1), cts:and-query((cts:element-value-query(fn:QName(\" \" ,\" id\" ), \" 0113\" , (\" lang=en\" ), 1), cts:element-value-query(fn:QName(\" http://purl.org/dc/elements/1.1/\" ,\" date\" ), \" 2007-03-03\" , (\" lang=en\" ), 1)), ()))) , (\" score-logtfidf\" ), 1))[1 to 10]" ;
124+ String expectedSearchReport = "(cts:search(fn:collection(), cts:or-query((cts:element-value-query(fn:QName(\" \" ,\" title\" ), \" The memex\" , (\" lang=en\" ), 1), cts:and-query((cts:element-value-query(fn:QName(\" \" ,\" id\" ), \" 0113\" , (\" lang=en\" ), 1), cts:element-value-query(fn:QName(\" http://purl.org/dc/elements/1.1/\" ,\" date\" ), \" 2007-03-03\" , (\" lang=en\" ), 1)), ())), ()) , (\" score-logtfidf\" ,cts:score-order( \" descending \" ) ), 1))[1 to 10]" ;
125125
126126 assertXpathEvaluatesTo (expectedSearchReport , "string(//*[local-name()='report'])" , resultDoc );
127127
@@ -164,7 +164,7 @@ public void testWithoutIndexSettingsAndNS() throws IOException, ParserConfigurat
164164 assertXpathEvaluatesTo ("1" , "string(//*[local-name()='result'][last()]//@*[local-name()='index'])" , resultDoc );
165165 assertXpathEvaluatesTo ("0012" , "string(//*[local-name()='result'][1]//*[local-name()='id'])" , resultDoc );
166166
167- String expectedSearchReport = "(cts:search(fn:collection(), cts:element-value-query(fn:QName(\" \" ,\" id\" ), \" 0012\" , (\" lang=en\" ), 1), (\" score-logtfidf\" ), 1))[1 to 10]" ;
167+ String expectedSearchReport = "(cts:search(fn:collection(), cts:element-value-query(fn:QName(\" \" ,\" id\" ), \" 0012\" , (\" lang=en\" ), 1), (\" score-logtfidf\" ,cts:score-order( \" descending \" ) ), 1))[1 to 10]" ;
168168
169169 assertXpathEvaluatesTo (expectedSearchReport , "string(//*[local-name()='report'])" , resultDoc );
170170
@@ -206,7 +206,7 @@ public void testWithIndexSettingsAndNS() throws IOException, ParserConfiguration
206206 assertXpathEvaluatesTo ("1" , "string(//*[local-name()='result'][last()]//@*[local-name()='index'])" , resultDoc );
207207 assertXpathEvaluatesTo ("2007-03-03" , "string(//*[local-name()='result'][1]//*[local-name()='date'])" , resultDoc );
208208
209- String expectedSearchReport = "(cts:search(fn:collection(), cts:element-value-query(fn:QName(\" http://purl.org/dc/elements/1.1/\" ,\" date\" ), \" 2007-03-03\" , (\" lang=en\" ), 1), (\" score-logtfidf\" ), 1))[1 to 10]" ;
209+ String expectedSearchReport = "(cts:search(fn:collection(), cts:element-value-query(fn:QName(\" http://purl.org/dc/elements/1.1/\" ,\" date\" ), \" 2007-03-03\" , (\" lang=en\" ), 1), (\" score-logtfidf\" ,cts:score-order( \" descending \" ) ), 1))[1 to 10]" ;
210210
211211 assertXpathEvaluatesTo (expectedSearchReport , "string(//*[local-name()='report'])" , resultDoc );
212212
@@ -250,7 +250,7 @@ public void testSpaceSeparated() throws IOException, ParserConfigurationExceptio
250250 assertXpathEvaluatesTo ("Vannevar Bush" , "string(//*[local-name()='result']//*[local-name()='title'])" , resultDoc );
251251 assertXpathEvaluatesTo ("0.1" , "string(//*[local-name()='result']//@*[local-name()='amt'])" , resultDoc );
252252
253- String expectedSearchReport = "(cts:search(fn:collection(), cts:and-query((cts:element-value-query(fn:QName(\" \" ,\" title\" ), \" Vannevar Bush\" , (\" lang=en\" ), 1), cts:element-attribute-value-query(fn:QName(\" http://cloudbank.com\" ,\" price\" ), fn:QName(\" \" ,\" amt\" ), \" 0.1\" , (\" lang=en\" ), 1)), ()), (\" score-logtfidf\" ), 1))[1 to 10]" ;
253+ String expectedSearchReport = "(cts:search(fn:collection(), cts:and-query((cts:element-value-query(fn:QName(\" \" ,\" title\" ), \" Vannevar Bush\" , (\" lang=en\" ), 1), cts:element-attribute-value-query(fn:QName(\" http://cloudbank.com\" ,\" price\" ), fn:QName(\" \" ,\" amt\" ), \" 0.1\" , (\" lang=en\" ), 1)), ()), (\" score-logtfidf\" ,cts:score-order( \" descending \" ) ), 1))[1 to 10]" ;
254254
255255 assertXpathEvaluatesTo (expectedSearchReport , "string(//*[local-name()='report'])" , resultDoc );
256256
0 commit comments