Skip to content

Commit 886dd12

Browse files
committed
[fix] license header URL
1 parent bc7a82a commit 886dd12

File tree

14 files changed

+101
-55
lines changed

14 files changed

+101
-55
lines changed

extensions/indexes/lucene/src/test/xquery/lucene/analyzers-index.xql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
: Copyright (C) 2001 The eXist-db Authors
44
:
55
: info@exist-db.org
6-
: http://exist-db.org
6+
: http://www.exist-db.org
77
:
88
: This library is free software; you can redistribute it and/or
99
: modify it under the terms of the GNU Lesser General Public
@@ -85,7 +85,9 @@ declare variable $anix:COLLECTION := "/db/" || $anix:COLLECTION_NAME;
8585
declare
8686
%test:setUp
8787
function anix:setUp() {
88-
( xmldb:create-collection("/db", $anix:COLLECTION_NAME),
88+
( xmldb:create-collection("/db/system", "config"),
89+
xmldb:create-collection("/db/system/config", "db"),
90+
xmldb:create-collection("/db", $anix:COLLECTION_NAME),
8991
xmldb:create-collection("/db/system/config/db", $anix:COLLECTION_NAME),
9092
xmldb:store("/db/system/config/db/" || $anix:COLLECTION_NAME, "collection.xconf", $anix:XCONF),
9193
xmldb:store($anix:COLLECTION, "text.xml", $anix:XML),

extensions/indexes/lucene/src/test/xquery/lucene/ft-attr-context.xql

Lines changed: 59 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
: Copyright (C) 2001 The eXist-db Authors
44
:
55
: info@exist-db.org
6-
: http://exist-db.org
6+
: http://www.exist-db.org
77
:
88
: This library is free software; you can redistribute it and/or
99
: modify it under the terms of the GNU Lesser General Public
@@ -23,7 +23,7 @@ xquery version "3.1";
2323

2424
(:~
2525
: XQSuite tests for queries on different indexes on different collection contexts.
26-
: Attribute context ft:query and util:index-keys (qname/path, @ vs attribute axis).
26+
: Attribute context ft:query and util:index-keys (qname/path, @att vs attribute axis).
2727
: Refactored from FT_AttTest_complex.xml (TestSet).
2828
:
2929
: @author Ron Van den Branden
@@ -32,7 +32,9 @@ module namespace ftac="http://exist-db.org/xquery/lucene/ft-attr-context/test";
3232

3333
declare namespace test="http://exist-db.org/xquery/xqsuite";
3434

35-
(:~ Collection config: p, @att1, //@att2 Lucene + range. :)
35+
(:~
36+
: Collection config: p, @att1, //@att2 Lucene + range.
37+
:)
3638
declare variable $ftac:XCONF as element(collection) :=
3739
<collection xmlns="http://exist-db.org/collection-config/1.0">
3840
<index xmlns:xs="http://www.w3.org/2001/XMLSchema">
@@ -49,7 +51,9 @@ declare variable $ftac:XCONF as element(collection) :=
4951
</index>
5052
</collection>;
5153

52-
(:~ Test document: p with att1, att2. :)
54+
(:~
55+
: Test document: p with att1, att2.
56+
:)
5357
declare variable $ftac:XML as document-node() :=
5458
document {
5559
<p att1="val1" att2="val2">this is a test document</p>
@@ -63,105 +67,139 @@ declare %private function ftac:term-callback($term as xs:string, $data as xs:int
6367
<term>{ $term }</term>
6468
};
6569

66-
(:~ setUp: create collection, config, store doc, reindex. :)
70+
(:~
71+
: setUp: create collection, config, store doc, reindex.
72+
:)
6773
declare
6874
%test:setUp
6975
function ftac:setUp() {
70-
( xmldb:create-collection("/db", $ftac:COLLECTION_NAME),
76+
( xmldb:create-collection("/db/system", "config"),
77+
xmldb:create-collection("/db/system/config", "db"),
78+
xmldb:create-collection("/db", $ftac:COLLECTION_NAME),
7179
xmldb:create-collection("/db/system/config/db", $ftac:COLLECTION_NAME),
7280
xmldb:store("/db/system/config/db/" || $ftac:COLLECTION_NAME, "collection.xconf", $ftac:XCONF),
7381
xmldb:store($ftac:COLLECTION, "test.xml", $ftac:XML),
7482
xmldb:reindex($ftac:COLLECTION) )
7583
};
7684

77-
(:~ tearDown: remove data and config collections. :)
85+
(:~
86+
: tearDown: remove data and config collections.
87+
:)
7888
declare
7989
%test:tearDown
8090
function ftac:tearDown() {
8191
xmldb:remove($ftac:COLLECTION),
8292
xmldb:remove("/db/system/config/db/" || $ftac:COLLECTION_NAME)
8393
};
8494

85-
(:~ [query] lucene FT index (qname), attribute context (@) :)
95+
(:~
96+
: [query] lucene FT index (qname), attribute context @att
97+
:)
8698
declare %test:assertEquals("val1") function ftac:query-qname-attr-at() {
8799
collection($ftac:COLLECTION)//p/@att1[ft:query(., 'val1')]/string()
88100
};
89101

90-
(:~ [query] lucene FT index (path), attribute context (@) :)
102+
(:~
103+
: [query] lucene FT index (path), attribute context @att
104+
:)
91105
declare %test:assertEquals("val2") function ftac:query-path-attr-at() {
92106
collection($ftac:COLLECTION)//p/@att2[ft:query(., 'val2')]/string()
93107
};
94108

95-
(:~ [query] lucene FT index (qname), attribute context attribute axis :)
109+
(:~
110+
: [query] lucene FT index (qname), attribute context attribute axis
111+
:)
96112
declare %test:assertEquals("val1") function ftac:query-qname-attr-attribute-axis() {
97113
collection($ftac:COLLECTION)//p/attribute::att1[ft:query(., 'val1')]/string()
98114
};
99115

100-
(:~ [query] lucene FT index (path), attribute context attribute axis :)
116+
(:~
117+
: [query] lucene FT index (path), attribute context attribute axis
118+
:)
101119
declare %test:assertEquals("val2") function ftac:query-path-attr-attribute-axis() {
102120
collection($ftac:COLLECTION)//p/attribute::att2[ft:query(., 'val2')]/string()
103121
};
104122

105-
(:~ [query] lucene FT index (qname), element context :)
123+
(:~
124+
: [query] lucene FT index (qname), element context
125+
:)
106126
declare %test:assertTrue function ftac:query-qname-element-context() {
107127
let $result := collection($ftac:COLLECTION)//p[ft:query(@att1, 'val1')]
108128
return deep-equal($result, collection($ftac:COLLECTION)//p)
109129
};
110130

111-
(:~ [query] lucene FT index (path), element context :)
131+
(:~
132+
: [query] lucene FT index (path), element context
133+
:)
112134
declare %test:assertTrue function ftac:query-path-element-context() {
113135
let $result := collection($ftac:COLLECTION)//p[ft:query(@att2, 'val2')]
114136
return deep-equal($result, collection($ftac:COLLECTION)//p)
115137
};
116138

117-
(:~ [query] lucene FT index (qname), attribute context inside predicate :)
139+
(:~
140+
: [query] lucene FT index (qname), attribute context inside predicate
141+
:)
118142
declare %test:assertTrue function ftac:query-qname-attr-in-predicate() {
119143
let $result := collection($ftac:COLLECTION)/*[descendant-or-self::p/@att1[ft:query(., 'val1')]]
120144
return deep-equal($result, collection($ftac:COLLECTION)//p)
121145
};
122146

123-
(:~ [query] lucene FT index (path), attribute context inside predicate :)
147+
(:~
148+
: [query] lucene FT index (path), attribute context inside predicate
149+
:)
124150
declare %test:assertTrue function ftac:query-path-attr-in-predicate() {
125151
let $result := collection($ftac:COLLECTION)/*[descendant-or-self::p/@att2[ft:query(., 'val2')]]
126152
return deep-equal($result, collection($ftac:COLLECTION)//p)
127153
};
128154

129-
(:~ [index] lucene FT index (qname), attribute context (@) :)
155+
(:~
156+
: [index] lucene FT index (qname), attribute context @att
157+
:)
130158
declare %test:assertTrue function ftac:index-qname-attr-at() {
131159
let $a := collection($ftac:COLLECTION)//p/@att1
132160
let $result := util:index-keys($a, '', util:function(xs:QName('ftac:term-callback'), 2), 100, 'lucene-index')
133161
return deep-equal($result, <term>val1</term>)
134162
};
135163

136-
(:~ [index] lucene FT index (path), attribute context (@) :)
164+
(:~
165+
: [index] lucene FT index (path), attribute context @att
166+
:)
137167
declare %test:assertTrue function ftac:index-path-attr-at() {
138168
let $a := collection($ftac:COLLECTION)//p/@att2
139169
let $result := util:index-keys($a, '', util:function(xs:QName('ftac:term-callback'), 2), 100, 'lucene-index')
140170
return deep-equal($result, <term>val2</term>)
141171
};
142172

143-
(:~ [index] lucene FT index (qname), attribute context attribute axis :)
173+
(:~
174+
: [index] lucene FT index (qname), attribute context attribute axis
175+
:)
144176
declare %test:assertTrue function ftac:index-qname-attr-attribute-axis() {
145177
let $a := collection($ftac:COLLECTION)//p/attribute::att1
146178
let $result := util:index-keys($a, '', util:function(xs:QName('ftac:term-callback'), 2), 100, 'lucene-index')
147179
return deep-equal($result, <term>val1</term>)
148180
};
149181

150-
(:~ [index] lucene FT index (path), attribute context attribute axis :)
182+
(:~
183+
: [index] lucene FT index (path), attribute context attribute axis
184+
:)
151185
declare %test:assertTrue function ftac:index-path-attr-attribute-axis() {
152186
let $a := collection($ftac:COLLECTION)//p/attribute::att2
153187
let $result := util:index-keys($a, '', util:function(xs:QName('ftac:term-callback'), 2), 100, 'lucene-index')
154188
return deep-equal($result, <term>val2</term>)
155189
};
156190

157-
(:~ [index] lucene FT index (qname), element context :)
191+
(:~
192+
: [index] lucene FT index (qname), element context
193+
:)
158194
declare %test:assertTrue function ftac:index-qname-element-context() {
159195
let $a := collection($ftac:COLLECTION)//p
160196
let $result := util:index-keys($a/@att1, '', util:function(xs:QName('ftac:term-callback'), 2), 100, 'lucene-index')
161197
return deep-equal($result, <term>val1</term>)
162198
};
163199

164-
(:~ [index] lucene FT index (path), element context :)
200+
(:~
201+
: [index] lucene FT index (path), element context
202+
:)
165203
declare %test:assertTrue function ftac:index-path-element-context() {
166204
let $a := collection($ftac:COLLECTION)//p
167205
let $result := util:index-keys($a/@att2, '', util:function(xs:QName('ftac:term-callback'), 2), 100, 'lucene-index')

extensions/indexes/lucene/src/test/xquery/lucene/ignore-condition.xql

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
: Copyright (C) 2001 The eXist-db Authors
44
:
55
: info@exist-db.org
6-
: http://exist-db.org
6+
: http://www.exist-db.org
77
:
88
: This library is free software; you can redistribute it and/or
99
: modify it under the terms of the GNU Lesser General Public
@@ -31,7 +31,9 @@ module namespace igc="http://exist-db.org/xquery/lucene/ignore-condition/test";
3131

3232
declare namespace test="http://exist-db.org/xquery/xqsuite";
3333

34-
(:~ Collection config: index doc; ignore note only when @type='editorial'. @return element :)
34+
(:~
35+
: Collection config: index doc; ignore note only when @type='editorial'. @return element
36+
:)
3537
declare variable $igc:XCONF as element(collection) :=
3638
<collection xmlns="http://exist-db.org/collection-config/1.0">
3739
<index xmlns:xs="http://www.w3.org/2001/XMLSchema">
@@ -43,7 +45,9 @@ declare variable $igc:XCONF as element(collection) :=
4345
</index>
4446
</collection>;
4547

46-
(:~ Test document: author note has "needle", editorial note has "onlyhere". @return document-node :)
48+
(:~
49+
: Test document: author note has "needle", editorial note has "onlyhere". @return document-node
50+
:)
4751
declare variable $igc:XML as document-node() :=
4852
document {
4953
<doc>
@@ -62,7 +66,9 @@ declare variable $igc:COLLECTION := "/db/" || $igc:COLLECTION_NAME;
6266
declare
6367
%test:setUp
6468
function igc:setUp() {
65-
( xmldb:create-collection("/db", $igc:COLLECTION_NAME),
69+
( xmldb:create-collection("/db/system", "config"),
70+
xmldb:create-collection("/db/system/config", "db"),
71+
xmldb:create-collection("/db", $igc:COLLECTION_NAME),
6672
xmldb:create-collection("/db/system/config/db", $igc:COLLECTION_NAME),
6773
xmldb:store("/db/system/config/db/" || $igc:COLLECTION_NAME, "collection.xconf", $igc:XCONF),
6874
xmldb:store($igc:COLLECTION, "test.xml", $igc:XML),

extensions/indexes/lucene/src/test/xquery/lucene/index-keys.xql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
: Copyright (C) 2001 The eXist-db Authors
44
:
55
: info@exist-db.org
6-
: http://exist-db.org
6+
: http://www.exist-db.org
77
:
88
: This library is free software; you can redistribute it and/or
99
: modify it under the terms of the GNU Lesser General Public
@@ -142,7 +142,9 @@ declare variable $idxk:EXPECTED_PATH_RANGE as element(entry)+ := (
142142
declare
143143
%test:setUp
144144
function idxk:setUp() {
145-
( xmldb:create-collection("/db", $idxk:COLLECTION_NAME),
145+
( xmldb:create-collection("/db/system", "config"),
146+
xmldb:create-collection("/db/system/config", "db"),
147+
xmldb:create-collection("/db", $idxk:COLLECTION_NAME),
146148
xmldb:create-collection("/db/system/config/db", $idxk:COLLECTION_NAME),
147149
xmldb:store("/db/system/config/db/" || $idxk:COLLECTION_NAME, "collection.xconf", $idxk:XCONF),
148150
xmldb:store($idxk:COLLECTION, "test1.xml", document { $idxk:TEST_DOC }),

extensions/indexes/lucene/src/test/xquery/lucene/indirect-queries.xql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
: Copyright (C) 2001 The eXist-db Authors
44
:
55
: info@exist-db.org
6-
: http://exist-db.org
6+
: http://www.exist-db.org
77
:
88
: This library is free software; you can redistribute it and/or
99
: modify it under the terms of the GNU Lesser General Public
@@ -97,7 +97,9 @@ declare variable $indq:EXPECTED_P2_MATCH as element(results) :=
9797
declare
9898
%test:setUp
9999
function indq:setUp() {
100-
( xmldb:create-collection("/db", $indq:COLLECTION_NAME),
100+
( xmldb:create-collection("/db/system", "config"),
101+
xmldb:create-collection("/db/system/config", "db"),
102+
xmldb:create-collection("/db", $indq:COLLECTION_NAME),
101103
xmldb:create-collection("/db/system/config/db", $indq:COLLECTION_NAME),
102104
xmldb:store("/db/system/config/db/" || $indq:COLLECTION_NAME, "collection.xconf", $indq:XCONF),
103105
xmldb:store($indq:COLLECTION, "test.xml", $indq:XML),

extensions/indexes/lucene/src/test/xquery/lucene/inline-ignore.xql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
: Copyright (C) 2001 The eXist-db Authors
44
:
55
: info@exist-db.org
6-
: http://exist-db.org
6+
: http://www.exist-db.org
77
:
88
: This library is free software; you can redistribute it and/or
99
: modify it under the terms of the GNU Lesser General Public

extensions/indexes/lucene/src/test/xquery/lucene/match-highlighting.xql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
: Copyright (C) 2001 The eXist-db Authors
44
:
55
: info@exist-db.org
6-
: http://exist-db.org
6+
: http://www.exist-db.org
77
:
88
: This library is free software; you can redistribute it and/or
99
: modify it under the terms of the GNU Lesser General Public

extensions/indexes/lucene/src/test/xquery/lucene/parenthesized-context.xql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
: Copyright (C) 2001 The eXist-db Authors
44
:
55
: info@exist-db.org
6-
: http://exist-db.org
6+
: http://www.exist-db.org
77
:
88
: This library is free software; you can redistribute it and/or
99
: modify it under the terms of the GNU Lesser General Public

extensions/indexes/lucene/src/test/xquery/lucene/parenthesized-location-step.xql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
: Copyright (C) 2001 The eXist-db Authors
44
:
55
: info@exist-db.org
6-
: http://exist-db.org
6+
: http://www.exist-db.org
77
:
88
: This library is free software; you can redistribute it and/or
99
: modify it under the terms of the GNU Lesser General Public

extensions/indexes/lucene/src/test/xquery/lucene/plain-ft-functions.xql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
: Copyright (C) 2001 The eXist-db Authors
44
:
55
: info@exist-db.org
6-
: http://exist-db.org
6+
: http://www.exist-db.org
77
:
88
: This library is free software; you can redistribute it and/or
99
: modify it under the terms of the GNU Lesser General Public

0 commit comments

Comments
 (0)