Calling padre-sw from the command line

Managed by | Updated .

Background

This article shows the two ways that the Funnelback query processor can be called directly from the command line.

Query supplied by environment variables

To call padre this way you need to set various environment variables (QUERY_STRING is probably the most important one to set) and use a command similar to the one below.

Additional query processor options can be set when calling padre-sw

Note: padre-sw will apply the query processor options that are defined in the collection's collection.cfg.

export QUERY_STRING=collection=coll&query=hello&scope=gov.au
$SEARCH_HOME/bin/padre-sw -num_ranks=50

Query supplied via a shell pipe

To call padre this way use a command similar to:

echo 'my query' | $SEARCH_HOME/bin/padre-sw $SEARCH_HOME/data/<COLLECTION>/live/idx/index <list of query processor  options eg. -stem=2 -num_ranks=20 -res=xml>
Was this artcle helpful?

Comments