The Search box in CUPS Web interface

Michael Sweet mike at easysw.com
Wed Jan 10 06:28:44 PST 2007


Opher Shachar wrote:
> Hello all,
> Is there a documentation somewhere to the syntax supported by the
> search box of jobs in the web interface?
> Through trial and error it seems that:
>         "this and that"
>     will return jobs whose name or owner have both terms (this, that; case insensitive)
>         "here there"
>     will return jobs whose name or owner have any of the terms
> and it seems theese can be combined.
> Is this by design? (read: will be supported in next versions)
> Are there more search options? Can the date field be searched?

There is no documentation at present.  The current implementation
supports simple AND and OR logic, with the default being OR.  You can
search on individual words (laserjet) or phrases ("a long long time
ago").  Compound logic generally doesn't work (one AND two AND three)
but some combinations do work (one AND two OR three AND four).
Searching is case-insensitive, so "foo" matches "Foo".

You can search for particular dates by name, but CUPS will not match
2007-01-01 to Jan 01 2007, for example, and there is no support for
"older than" or "younger than" searches.

As for *what* gets searched, the printer, job, and class pages search
all of the text that is shown for each printer, job, or class.  The
help pages currently only search the titles in the help files (that
will be changing for CUPS 1.3 real soon...)

If you are interested in the implementation, look at cgi-bin/search.c,
which implements a generic text matching API.  The current code uses
regular expressions to do the matching...

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com




More information about the cups mailing list