[Xapian-discuss] Trying to get omegascript configured to support
multiple dbs
Olly Betts
olly at survex.com
Fri Jan 6 17:19:20 GMT 2006
On Fri, Jan 06, 2006 at 11:40:52AM -0500, Jim Lynch wrote:
> Well it does sort of. Two problems. It always looks for the default
> even if I've got it unchecked. The other problem is if I have both of
> them checked, when I return from the query, it resets the test
> checkbox. I suspect that's because the cgi parameter, DB is a list and
> I don't know how to say "if tst.db is in the DB list, then ...".
Note that $cgi{DB} will pick an arbitrary DB parameter if there's more
than one. You want $cgilist{DB} which will return all the values, as
a tab-separated list.
But there's no obvious way to see if a list contains a particular value
which is what you then need to be able to do. Something like
$find{LIST,STRING} to return the offset into the list, or the empty
string if not present. I'll see if I can manage to implement that
before the next release.
A related issue to bear in mind is what happens if there's no DB
parameter (in which case Omega will search the database "default").
Cheers,
Olly
More information about the Xapian-discuss
mailing list