Repository: vxquery Updated Branches: refs/heads/master 233a43064 -> 6b85b579e
Improved indexing documentation. - Rewrote the indexing documentation to used XQuery style function definitions. - Renamed show-index to show-indexes. Project: http://git-wip-us.apache.org/repos/asf/vxquery/repo Commit: http://git-wip-us.apache.org/repos/asf/vxquery/commit/6b85b579 Tree: http://git-wip-us.apache.org/repos/asf/vxquery/tree/6b85b579 Diff: http://git-wip-us.apache.org/repos/asf/vxquery/diff/6b85b579 Branch: refs/heads/master Commit: 6b85b579ec52f5754097d22b25d15a87a29f61f0 Parents: 233a430 Author: Preston Carman <prest...@apache.org> Authored: Thu Oct 13 16:46:50 2016 -0700 Committer: Preston Carman <prest...@apache.org> Committed: Thu Oct 13 16:46:50 2016 -0700 ---------------------------------------------------------------------- src/site/apt/user_indexing.apt | 246 ++++++------------- .../vxquery/functions/builtin-functions.xml | 4 +- .../Indexing/Partition-1/showIndex1.txt | 1 - .../Indexing/Partition-1/showIndex2.txt | 1 - .../Indexing/Partition-1/showIndexes1.txt | 1 + .../Indexing/Partition-1/showIndexes2.txt | 1 + .../Indexing/Partition-2/showIndex1.txt | 2 - .../Indexing/Partition-2/showIndexes1.txt | 2 + .../Indexing/Partition-4/showIndex1.txt | 6 - .../Indexing/Partition-4/showIndexes1.txt | 6 + .../XQuery/Indexing/Partition-1/showIndex.xq | 19 -- .../XQuery/Indexing/Partition-1/showIndexes.xq | 19 ++ .../XQuery/Indexing/Partition-2/showIndex.xq | 19 -- .../XQuery/Indexing/Partition-2/showIndexes.xq | 19 ++ .../XQuery/Indexing/Partition-4/showIndex.xq | 19 -- .../XQuery/Indexing/Partition-4/showIndexes.xq | 19 ++ .../src/test/resources/cat/IndexingQueries.xml | 24 +- 17 files changed, 161 insertions(+), 247 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/vxquery/blob/6b85b579/src/site/apt/user_indexing.apt ---------------------------------------------------------------------- diff --git a/src/site/apt/user_indexing.apt b/src/site/apt/user_indexing.apt index ce7fafa..97c9616 100644 --- a/src/site/apt/user_indexing.apt +++ b/src/site/apt/user_indexing.apt @@ -13,246 +13,160 @@ ~~ See the License for the specific language governing permissions and ~~ limitations under the License. -How to use Indexing Features in VXQuery. +Indexing In VXQuery - In VXQuery, all the indexes are created in user specified directory. In order to use indexing, - you will need to set this directory in your cluster configuration file. + VXQuery includes indexing functionality for creating, viewing, using, updating and deleting. -* Configuring VXQuery to use indexing functions. - Add the following line to your cluster configuration (e.g. cluster.xml) +* Configuring Indexing + + VXQuery creates all indexes in a user specified directory. + In order to use indexing, you will need to set the index directory in your cluster configuration file. + Add the following line to your cluster configuration (e.g. cluster.xml). + Make sure you create the indexing directory ("path/to/index/directory"). + Please note: The indexing directory must exist on all nodes. -------- -<index_directory><path_to_index_directory></index_directory> +<index_directory>path/to/index/directory</index_directory> -------- - (You should create this index_directory) - -* Using indexing queries. - - VXQuery offers following indexing functionality. - - [[a]] Create an index for collection. - [[b]] Use the index in executing a query. - [[c]] Update the index. - [[d]] Delete the index. - [[e]] View existing indexes. - -*Scenario I - When collection is a single directory. - In this scenario, all the XML files are stored in a single directory. (There can be sub directories) +* Creating An Index For A Collection -** Creating an index for collection - - If I need to create index for xml collection stored in <path_to_collection_1>, - - Query structure: + To create an index for an XML collection stored in <$collection>, use the following query: -------- -build-index-on-collection("<path_to_collection_1>") +build-index-on-collection($collection as xs:string) as xs:boolean -------- - You can see the index has created in a new sub-directory in the index_directory specified in local.xml + Consider an example where this function takes the collection path ("/home/data/bookstore/barnes") as an argument. Example: -------- -build-index-on-collection("<path_to_collection_1>") +build-index-on-collection("/home/data/bookstore/barnes") -------- - This function takes the collection path as an argument. - -** Using index in query. - - If we need to use the index and execute a query, use the following structure. + Result: ------ -for $r in collection-from-index("<path1>/collection1", "/dataCollection/data")/data -where $r/dataType eq "AWND" and xs:decimal($r/value) gt 491.744 -return $r +true ------ - Here the index access function is, ------- -collection-from-index ------- +* Viewing Indexes - which takes two arguments, collection folder and the path element. - - Result: + The <show-indexes> function displays a list of collections that have been indexed. + This function takes no arguments and returns a sequence of collection paths. + If there are no indexes created for any collection, the result will be an empty sequence. ------ -<data> - <date>2001-01-01T00:00:00.000</date> - <dataType>AWND</dataType> - <station>GHCND:US000000001</station> - <value>1000</value> - <attributes> - <attribute/> - <attribute/> - <attribute>a</attribute> - </attributes> -</data> +show-indexes() as xs:string* ------ -** Updating the index. - - A collection can be modified or changed by following ways. - [[1]] Inserting new XML files. - [[2]] Deleting files. - [[3]] Add/ remove or modify the content of XML files. - - In this type of situation, the index corresponding to the modified collection must also be modified. - To achieve this the update-index function can be used. - - Query structure: - --------- -update-index("<path_to_collection_1>") --------- + Suppose we have a two collections ("/home/data/bookstore/barnes" and "/home/data/bookstore/borders") that have been indexed. Example: -------- -update-index("<path_to_collection_1>") -------- +------ +show-indexes() +------ - This function takes the collection which was modified. + Result: -** Deleting the index. +------ +/home/data/bookstore/barnes +/home/data/bookstore/borders +------ - If we want to delete the entire index created for a collection, the delete-index function can be used. - This function also takes the collection path of which the index is needed to be deleted. +* Using An Index In Query - Query structure: + To use an index in a query, use the <collection-from-index> function. + The function takes two arguments: <$collection> as <xs:string> and <$path> as <xs:string> + The query is written the same way as you would use the <collection> function with one additional argument for the + search path steps. --------- -delete-index("<path_to_collection_1>") --------- +------ +collection-from-index($collection as xs:string, $path as xs:string) as node()* +------ Example: -------- -delete-index("<path_to_collection_1>") -------- +------ +for $x in collection-from-index("/home/data/bookstore/barnes", "/bookstore/book")/book +where $x/price<30 +order by $x/title +return $x/title +------ -*Scenario II - When the collection is distributed. + Result: - In this scenario, the collection is distributed among several directories. - We can distribute the queries among partitions. +------ +<book category="CHILDREN"> + <title lang="en">Harry Potter</title> + <author>J K. Rowling</author> + <year>2005</year> + <price>29.99</price> +</book> +------ -** Creating indexes for collections. +* Updating An Index - Query structure: + When the indexed data has changed, the index can be updated corresponding. + The <update-index> function will check for file system changes and update an index. + The function takes one argument: <$collection> as xs:string. -------- -build-index-on-collection("<path_to_collection_1>|<path_to_collection_2>|...|<path_to_collection_n>") +update-index($collection as xs:string) as xs:boolean -------- - In here the parameter contains the list of collection partitions separated by '|' character. - Example: - Consider the collection has now distributed among four directories, path_to_collection_1, path_to_collection_2, - path_to_collection_3 and path_to_collection_4. - - To create indexes for all of the above collections, - ------- -build-index-on-collection("path_to_collection_1|path_to_collection_2|path_to_collection_3|path_to_collection_4") +update-index("/home/data/bookstore/barnes") ------- - In this case, all indexes will be created in separate sub-directories corresponding to each partition. - Also note that this query requires each node to have four partitions available. - -** Using the indexes in query. - - In this case, suppose you need to run a query on indexes of two collection partitions. - - Example: - ------ -for $r in collection-from-index("<path_to_collection_1>|<path_to_collection_2>", "/dataCollection/data")/data -where $r/dataType eq "AWND" and xs:decimal($r/value) gt 491.744 -return $r ------ - - The result will be taken from the indexes of both path_to_collection_1 and path_to_collection_2. - Result: ------ -<data> - <date>2001-01-01T00:00:00.000</date> - <dataType>AWND</dataType> - <station>GHCND:US000000001</station> - <value>1000</value> - <attributes> - <attribute/> - <attribute/> - <attribute>a</attribute> - </attributes> -</data> +true ------ -** Updating the indexes. - In cases of updating the collection files stored in several partitions, we can use this function to update the - indexes of those directories. +* Deleting An Index - In this case, give a '|' separated list of collection directories. - - Query structure: + An index can be deleted by using the <delete-index> function. + The function takes one argument: <$collection> as xs:string. -------- -update-index("<path_to_collection_1>|<path_to_collection_2>|...|<path_to_collection_n>") +delete-index($collection as xs:string) as xs:boolean -------- Example: - Suppose that we need to update the indexes in partition1 and partition4 - --------- -update-index("<path_to_collection_1>|<path_to_collection_4>") --------- +------- +delete-index("/home/data/bookstore/barnes") +------- -** Deleting the indexes. + Result: - If we want to delete indexes of collections in several partitions, we can use this function. +------ +true +------ - Query structure: --------- -delete-index("<path_to_collection_1>|<path_to_collection_2>|...|<path_to_collection_n>") --------- +* Indexing Partitioned Collections - Example: + Similar to the <collection> function, indexing queries can be partitioned for collection distributed among + several directories. + Partitioned queries use the vertical bar (|) to delimit partition paths within a query. - Suppose that we need to update the indexes in collection2 and collection3 + Previous examples used a single collection. + The following example has two collections in a single <$collection> variable for building an index: -------- -delete-index("<path_to_collection_2>|<path_to_collection_3>") +build-index-on-collection("/home/data/bookstore/barnes|/home/data/bookstore/borders") -------- -** Viewing Index information. - - Suppose you need to check, what are the collections have indexes created. - To do this, the show-index function can be used. - This function takes no arguments and returns a sequence of collection paths, which an index is already created. - If there are no indexes created for any collection, the result will be null. + The partition delimiter can be used in all the indexing <$collection> arguments. - Suppose we have two collections, <path_to_collection_1>, <path_to_collection_2> have indexes created. - - Example: - ------- -show-index() ------- - - Result: - ------- -<path_to_collection_1> -<path_to_collection_2> ------- http://git-wip-us.apache.org/repos/asf/vxquery/blob/6b85b579/vxquery-core/src/main/java/org/apache/vxquery/functions/builtin-functions.xml ---------------------------------------------------------------------- diff --git a/vxquery-core/src/main/java/org/apache/vxquery/functions/builtin-functions.xml b/vxquery-core/src/main/java/org/apache/vxquery/functions/builtin-functions.xml index 688e86e..d64f423 100644 --- a/vxquery-core/src/main/java/org/apache/vxquery/functions/builtin-functions.xml +++ b/vxquery-core/src/main/java/org/apache/vxquery/functions/builtin-functions.xml @@ -163,8 +163,8 @@ <!-- collection-from-index operator is added during the rewrite rules phase. --> </function> - <!-- fn:show-index as node()* --> - <function name="fn:show-index"> + <!-- fn:show-indexes as node()* --> + <function name="fn:show-indexes"> <return type="node()*"/> <runtime type="scalar" class="org.apache.vxquery.runtime.functions.index.ShowIndexScalarEvaluatorFactory"/> </function> http://git-wip-us.apache.org/repos/asf/vxquery/blob/6b85b579/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-1/showIndex1.txt ---------------------------------------------------------------------- diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-1/showIndex1.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-1/showIndex1.txt deleted file mode 100644 index 17d6fec..0000000 --- a/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-1/showIndex1.txt +++ /dev/null @@ -1 +0,0 @@ -src/test/resources/TestSources/ghcnd http://git-wip-us.apache.org/repos/asf/vxquery/blob/6b85b579/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-1/showIndex2.txt ---------------------------------------------------------------------- diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-1/showIndex2.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-1/showIndex2.txt deleted file mode 100644 index 8b13789..0000000 --- a/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-1/showIndex2.txt +++ /dev/null @@ -1 +0,0 @@ - http://git-wip-us.apache.org/repos/asf/vxquery/blob/6b85b579/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-1/showIndexes1.txt ---------------------------------------------------------------------- diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-1/showIndexes1.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-1/showIndexes1.txt new file mode 100644 index 0000000..17d6fec --- /dev/null +++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-1/showIndexes1.txt @@ -0,0 +1 @@ +src/test/resources/TestSources/ghcnd http://git-wip-us.apache.org/repos/asf/vxquery/blob/6b85b579/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-1/showIndexes2.txt ---------------------------------------------------------------------- diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-1/showIndexes2.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-1/showIndexes2.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-1/showIndexes2.txt @@ -0,0 +1 @@ + http://git-wip-us.apache.org/repos/asf/vxquery/blob/6b85b579/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-2/showIndex1.txt ---------------------------------------------------------------------- diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-2/showIndex1.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-2/showIndex1.txt deleted file mode 100644 index 31d670b..0000000 --- a/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-2/showIndex1.txt +++ /dev/null @@ -1,2 +0,0 @@ -src/test/resources/TestSources/ghcnd/half_1 -src/test/resources/TestSources/ghcnd/half_2 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/vxquery/blob/6b85b579/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-2/showIndexes1.txt ---------------------------------------------------------------------- diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-2/showIndexes1.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-2/showIndexes1.txt new file mode 100644 index 0000000..31d670b --- /dev/null +++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-2/showIndexes1.txt @@ -0,0 +1,2 @@ +src/test/resources/TestSources/ghcnd/half_1 +src/test/resources/TestSources/ghcnd/half_2 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/vxquery/blob/6b85b579/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-4/showIndex1.txt ---------------------------------------------------------------------- diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-4/showIndex1.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-4/showIndex1.txt deleted file mode 100644 index e696773..0000000 --- a/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-4/showIndex1.txt +++ /dev/null @@ -1,6 +0,0 @@ -src/test/resources/TestSources/ghcnd/half_2/quarter_3 -src/test/resources/TestSources/ghcnd/half_1 -src/test/resources/TestSources/ghcnd/half_2/quarter_4 -src/test/resources/TestSources/ghcnd/half_2 -src/test/resources/TestSources/ghcnd/half_1/quarter_2 -src/test/resources/TestSources/ghcnd/half_1/quarter_1 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/vxquery/blob/6b85b579/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-4/showIndexes1.txt ---------------------------------------------------------------------- diff --git a/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-4/showIndexes1.txt b/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-4/showIndexes1.txt new file mode 100644 index 0000000..e696773 --- /dev/null +++ b/vxquery-xtest/src/test/resources/ExpectedTestResults/Indexing/Partition-4/showIndexes1.txt @@ -0,0 +1,6 @@ +src/test/resources/TestSources/ghcnd/half_2/quarter_3 +src/test/resources/TestSources/ghcnd/half_1 +src/test/resources/TestSources/ghcnd/half_2/quarter_4 +src/test/resources/TestSources/ghcnd/half_2 +src/test/resources/TestSources/ghcnd/half_1/quarter_2 +src/test/resources/TestSources/ghcnd/half_1/quarter_1 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/vxquery/blob/6b85b579/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-1/showIndex.xq ---------------------------------------------------------------------- diff --git a/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-1/showIndex.xq b/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-1/showIndex.xq deleted file mode 100644 index 5ca9c2f..0000000 --- a/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-1/showIndex.xq +++ /dev/null @@ -1,19 +0,0 @@ -(: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. :) - -(: Show indexes after createion :) -show-index() \ No newline at end of file http://git-wip-us.apache.org/repos/asf/vxquery/blob/6b85b579/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-1/showIndexes.xq ---------------------------------------------------------------------- diff --git a/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-1/showIndexes.xq b/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-1/showIndexes.xq new file mode 100644 index 0000000..fdcea23 --- /dev/null +++ b/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-1/showIndexes.xq @@ -0,0 +1,19 @@ +(: Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. :) + +(: Show indexes after creation :) +show-indexes() \ No newline at end of file http://git-wip-us.apache.org/repos/asf/vxquery/blob/6b85b579/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-2/showIndex.xq ---------------------------------------------------------------------- diff --git a/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-2/showIndex.xq b/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-2/showIndex.xq deleted file mode 100644 index 5ca9c2f..0000000 --- a/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-2/showIndex.xq +++ /dev/null @@ -1,19 +0,0 @@ -(: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. :) - -(: Show indexes after createion :) -show-index() \ No newline at end of file http://git-wip-us.apache.org/repos/asf/vxquery/blob/6b85b579/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-2/showIndexes.xq ---------------------------------------------------------------------- diff --git a/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-2/showIndexes.xq b/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-2/showIndexes.xq new file mode 100644 index 0000000..fdcea23 --- /dev/null +++ b/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-2/showIndexes.xq @@ -0,0 +1,19 @@ +(: Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. :) + +(: Show indexes after creation :) +show-indexes() \ No newline at end of file http://git-wip-us.apache.org/repos/asf/vxquery/blob/6b85b579/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-4/showIndex.xq ---------------------------------------------------------------------- diff --git a/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-4/showIndex.xq b/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-4/showIndex.xq deleted file mode 100644 index 5ca9c2f..0000000 --- a/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-4/showIndex.xq +++ /dev/null @@ -1,19 +0,0 @@ -(: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. :) - -(: Show indexes after createion :) -show-index() \ No newline at end of file http://git-wip-us.apache.org/repos/asf/vxquery/blob/6b85b579/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-4/showIndexes.xq ---------------------------------------------------------------------- diff --git a/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-4/showIndexes.xq b/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-4/showIndexes.xq new file mode 100644 index 0000000..fdcea23 --- /dev/null +++ b/vxquery-xtest/src/test/resources/Queries/XQuery/Indexing/Partition-4/showIndexes.xq @@ -0,0 +1,19 @@ +(: Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. :) + +(: Show indexes after creation :) +show-indexes() \ No newline at end of file http://git-wip-us.apache.org/repos/asf/vxquery/blob/6b85b579/vxquery-xtest/src/test/resources/cat/IndexingQueries.xml ---------------------------------------------------------------------- diff --git a/vxquery-xtest/src/test/resources/cat/IndexingQueries.xml b/vxquery-xtest/src/test/resources/cat/IndexingQueries.xml index fc668ba..7cf6bf6 100644 --- a/vxquery-xtest/src/test/resources/cat/IndexingQueries.xml +++ b/vxquery-xtest/src/test/resources/cat/IndexingQueries.xml @@ -25,10 +25,10 @@ <query name="createIndex" date="2016-05-26"/> <output-file compare="Text">createIndex.txt</output-file> </test-case> - <test-case name="show-index-1" FilePath="Indexing/Partition-1/" Creator="Menaka Jayawardena"> + <test-case name="show-indexes-1" FilePath="Indexing/Partition-1/" Creator="Menaka Jayawardena"> <description>Show indexes after creating index.</description> - <query name="showIndex" date="2016-08-18"/> - <output-file compare="Text">showIndex1.txt</output-file> + <query name="showIndexes" date="2016-08-18"/> + <output-file compare="Text">showIndexes1.txt</output-file> </test-case> <test-case name="use-index-1" FilePath="Indexing/Partition-1/" Creator="Steven Jacobs"> <description>Get Collection From Lucene Index</description> @@ -75,20 +75,20 @@ <query name="deleteIndex" date="2016-06-24"/> <output-file compare="Text">deleteIndex.txt</output-file> </test-case> - <test-case name="show-index-2" FilePath="Indexing/Partition-1/" Creator="Menaka Jayawardena"> + <test-case name="show-indexes-2" FilePath="Indexing/Partition-1/" Creator="Menaka Jayawardena"> <description>Show indexes after deletion.</description> - <query name="showIndex" date="2016-08-18"/> - <output-file compare="Text">showIndex2.txt</output-file> + <query name="showIndexes" date="2016-08-18"/> + <output-file compare="Text">showIndexes2.txt</output-file> </test-case> <test-case name="create-index" FilePath="Indexing/Partition-2/" Creator="Steven Jacobs"> <description>Create Lucene Index from Collection.</description> <query name="createIndex" date="2016-05-26"/> <output-file compare="Text">createIndex.txt</output-file> </test-case> - <test-case name="show-index-1" FilePath="Indexing/Partition-2/" Creator="Menaka Jayawardena"> + <test-case name="show-indexes-1" FilePath="Indexing/Partition-2/" Creator="Menaka Jayawardena"> <description>Show indexes after creating index.</description> - <query name="showIndex" date="2016-08-18"/> - <output-file compare="Text">showIndex1.txt</output-file> + <query name="showIndexes" date="2016-08-18"/> + <output-file compare="Text">showIndexes1.txt</output-file> </test-case> <test-case name="use-index-1" FilePath="Indexing/Partition-2/" Creator="Steven Jacobs"> <description>Get Collection From Lucene Index</description> @@ -135,10 +135,10 @@ <query name="createIndex" date="2016-05-26"/> <output-file compare="Text">createIndex.txt</output-file> </test-case> - <test-case name="show-index-1" FilePath="Indexing/Partition-4/" Creator="Menaka Jayawardena"> + <test-case name="show-indexes-1" FilePath="Indexing/Partition-4/" Creator="Menaka Jayawardena"> <description>Show indexes after creating index.</description> - <query name="showIndex" date="2016-08-18"/> - <output-file compare="Text">showIndex1.txt</output-file> + <query name="showIndexes" date="2016-08-18"/> + <output-file compare="Text">showIndexes1.txt</output-file> </test-case> <test-case name="use-index-1" FilePath="Indexing/Partition-4/" Creator="Steven Jacobs"> <description>Get Collection From Lucene Index</description>