Described are a system and method for generating a search expression for
use in searching heterogeneous repositories. An application program
receives user-supplied input. A template is selected based on a structure
of the input. The input is scanned and tokenized. Each token is
substituted into one or more locations within the template designated for
that token to produce a string-based search expression. The search
expression can have logical OR and logical AND operations, parentheses to
specify precedence of evaluation, and an infix notation. Templates are
modifiable for changing the content of search expressions constructed for
a given user input. User-specifiable and user-modifiable aspects include
the selecting of particular attributes, operators, and evaluation
precedence of template expressions, the tokenizing of user input, the
mapping of token sequences to particular templates, and the designation
of locations within a selected token expression in which to substitute
tokens derived from the user input.