The Search box in CUPS Web interface

Opher Shachar ophers at ladpc.co.il
Wed Jan 17 00:44:20 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...

Thank you for the reply, and I'm sorry for the late response...
I tried some search combination as you depicted. The logic (OR, AND) works but I'm unable to search by date. Searching for the single term "2007" returns no results, the same when searching for "Jan".
I've not looked at search.c (not sure I'll get to it soon).
Still, the current workings suites our needs.

Thanks,
Opher Shachar.





More information about the cups mailing list