[Xapian-tickets] [Xapian] #792: Add a CGI param "LOC" to indicate a path to a leaf from database_dir folder
Xapian
nobody at xapian.org
Mon Aug 26 05:26:29 BST 2019
#792: Add a CGI param "LOC" to indicate a path to a leaf from database_dir folder
-------------------------+-------------------------
Reporter: ohallot | Owner: olly
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Omega | Version:
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: | Operating System: All
-------------------------+-------------------------
Comment (by olly):
james: I think it's the other way around - `pt-BR`, etc are Xapian
databases, but there's a set of those within each version directory.
I assume this follows on from a recent IRC discussion about why
`DB=6.4/fr` didn't work.
I'm not sure adding another CGI variable it really the best way to resolve
the current restriction. It allows `LOC=6.4&DB=fr` so solves the
immediate problem, but it imposes needless restrictions since you can't
specify a different `LOC` for each `DB`, so you couldn't search the `fr`
database for every version together (which is probably potentially useful
here, and certainly is in the wider context).
My thought would be to instead add a config file option to allow
specifying the separator used when generating the value for `$dbname` and
when parsing `DB` parameters. Then you could pick a different one which
would allow `/` to be used in `DB` parameters. We could probably even
support `//` for that separator which would allow all valid relative Unix
path names to be specified (a relative path so can't validly start with
`/`, and double `/` between directory components or a trailing `/` on it
would each be redundant).
The separator could default to `/` for compatibility and to avoid
surprising people on upgrade by suddenly allowing access to databases that
couldn't previously be reached, but potentially we could change that
default in a new major version.
--
Ticket URL: <https://trac.xapian.org/ticket/792#comment:2>
Xapian <https://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list