Pierre Tutorials

Pierre Command Line Application - Simple Search


Description


Simple search allows end users to use pre-existing, or canned, queries. These have been designed and implemented by the service designer to try and cover the most common queries that might be made of the data in question.

End users must first select the kind of search they wish to make by choosing from a list which is found by using the -showSimpleSearches command option. The one chosen is then used to create a template with the -createSimpleTemplate. This command takes the kind of search chosen; when specified, this search must be put in double quotes just as it is shown in the list. You must also give a name to the file being generated. This is the file that you will then need to edit in order to put in the values you wish to search on. the file is created in the same directory as the command.

After you fill in the desired search values, just save this file. Then you need to use the command option -simpleSearch and give it the filename of the file you have just filled in. The results can be sent to a file or the screen and the format can be made to be text or HTML. Command options for simple searching are listed below.


-showSimpleSearches

lists feature names enclosed in double quotes. These identifiers should be used as parameters to create template files using the -createSimpleTemplate feature.

-createSimpleTemplate queryFeatureName fileName

creates a blank template you can fill in with query field parameters. When you specify a query feature name in double quotes (see -showSimplesearches) this tells Pierre which query feature you want to make a blank for. The fileName value is the name of the template file. You will need to specify this file later on when you want to run a query (see -simpleSearch). You can edit the template file and fill in values of the query fields that will be sent to the data repository.

-simpleSearch fileName

performs a simple search; specifies the query feature file you want to submit to the data respository. This file is created from the -createSimpleTemplate command option.

-htmlFormat

formats the results to be HTML

-textFormat

formats the results to be text format

-resultFile fileName

specifies the file to store the results. If no file is specified, the results are displayed on the screen.

-userID userName

specifies the name of the user. This may be required by the data repository.

-help

displays all the commands available for this service with descriptions