-- *****************************************************************************
-- Licensed Materials - Property of IBM                                        *
--                                                                             *
-- (c) Copyright IBM Corporation 2008.                                         *
-- All rights reserved.                                                        *
--                                                                             *
-- US Government Users Restricted Rights - Use, duplication or                 *
-- disclosure restricted by GSA ADP Schedule Contract with                     *
-- IBM Corporation.                                                            *
--******************************************************************************
--  Permission Notice                                                          *
--                                                                             *
--  Permission is granted to copy, use, modify, and merge this sample          *
--  software into your applications and to permit others to do any of the      *
--  foregoing. You may further distribute this software for                    *
--  commercial purposes only as part of your application that adds             *
--  significant value and function beyond that provided by these               *
--  samples.                                                                   *
--  You must include this permission statement and retain the copyright        *
--  notice in all copies and modified versions of this software.               *
--                                                                             *
--******************************************************************************
--                                                                             *
--  DISCLAIMER OF WARRANTIES                                                   *
--                                                                             *
--  The sample software is provided to you by IBM to assist you in             *
--  developing your applications. THIS SOFTWARE IS PROVIDED AS-IS,             *
--  WITHOUT WARRANTY OF ANY KIND. IBM SHALL NOT BE LIABLE FOR ANY              *
--  DAMAGES ARISING OUT OF YOUR USE OR THE USE BY ANY THIRD PARTY OF           *
--  OF THE SAMPLE SOFTWARE EVEN IF IT HAS BEEN ADVISED OF THE POSSIBILITY      *
--  OF SUCH DAMAGES. IN ADDITION, IBM SHALL NOT BE LIABLE FOR ANY THIRD        *
--  PARTY CLAIMS AGAINST YOU.                                                  *
--                                                                             *
--******************************************************************************
--
-- DB2 Net Search Extender
--
-- Version:       9.7
-- Content:       Samples for the usage of DB2 Net Search Extender
-- Prerequisite:  1. xmlsample executed (xmlsample.bat for windows, 
--		     xmlsample for unix)
--                2. Net Search Extender has to be started using
--                   'db2text start'.
--                3. Connect to the database used for the sample.
-- Usage:         Call from the operating system command line:
--                db2 -tvf xmlsearch
--                (For Windows NT: first enter the db2 command line environment
--		   with db2cmd command )
-- ****************************************************************************

    SELECT docID 
	FROM db2ext.testSearch 
	WHERE contains(text,'"HYDROBATIDAE"') = 1
        ORDER BY 1;
 
    SELECT docID 
	FROM db2ext.testSearch
   	WHERE contains(text, 'sections ("species") "Albatross"') = 1
        ORDER BY 1;  

    SELECT docID 
	FROM db2ext.testSearch 
	WHERE contains(text,'sections ("scientificName") 
			     "Crypturellus kerriae"') = 1
	ORDER BY 1;

    XQUERY db2-fn:sqlquery('SELECT text 
			    FROM db2ext.testSearch 
			    WHERE contains(text,''sections ("orderName") 
			    "gaviiformes"'') = 1 and docID = 1')/*;
