![]() |
[Home] [Databases] [Search] [WorldLII] [Feedback] [Help] | Related Links |
SINO CGI API |
![]() ![]() |
|
You are here: AustLII >> Technical Library >> Web Developers >> SINO CGI API |
...and so welcome to the SINO CGI API.
A concordance is an index of words, built over a group of documents. For example, the entire AustLII primary and secondary materials collection is indexed in a single physical concordance. A concordance acts much like the index at the back of a book. You look up a word, and get a list of documents (or in a book index, a list of page numbers).
A physical concordance ("PhC") is one that actually exists on the system. That is to say, there is a real file that corresponds to that PhC. In the context of virtual concordances below, a PhC is sometimes also known as a "database" (but don't confuse this with an AustLII database -- they're seperate concepts of "database").
PhC's have a file location on the web server, but you can't access them directly. You can only access their contents via the virtual concordance ("VC"). This is actually much more convenient, but sometimes you want to be able to refer to specific PhC within a search form. In such cases, you use the PhC alias to "single out" the PhC within the VC.
A virtual concordance ("VC") is a collection of one or more physical concordances ("PhC's") that you can search in one hit. When building a search interface into AustLII, you must specify one (and only one) VC. Your users search is then conducted over the documents in that VC.
As stated above, a VC is one or more PhC's. So in searching a VC, you may in fact be moving over multiple concordances. For example, here are three PhC's that exist on AustLII:
/au: Concordance of all Australian materials under www.austlii.edu.au/au/;
/nz: Concordance of all New Zealand materials under www.austlii.edu.au/nz/;
/sp: Concordance of all South Pacific materials under www.austlii.edu.au/sp/.
Each of these has a corresponding VC, so they can be searched individually. However there is also a VC called /austlii which contains all three PhC's. Specifying a VC of "/austlii" therefore searches material from Australia, New Zealand and the South Pacific -- all from the one search.
A PhC doesn't necessarily have a corresponding VC but generally they do. The specific VC's and PhC's available at a SINO web site will vary. The AustLII VC List is available here.
Note that, in search results, the results from the PhC's are not merged -- each PhC appears with a seperate heading in the results for the VC.
So let's say we want our users to only search High Court cases. That's an Australian database so we set our VC to "/au" since that's a valid VC name (it's in the AustLII VC List). How do we single out the High Court?
The High Court is located at /au/cases/cth/high_ct/ on the AustLII server. What we do is specify a mask path that begins with that location. For example
<input type="hidden" name="mask_path"
value="au/cases/cth/high_ct">
Now anything our user searches for will be restricted to the High Court database. We can list multiple mask paths, in order to select multiple databases:
<input type="hidden" name="mask_path" value="au/cases/cth/high_ct">
<input type="hidden" name="mask_path" value="au/cases/cth/federal_ct">
This allows us to search both High Court and Federal Court cases at the same time. You can build any combination you want -- provided those mask paths are part of that VC.
A problem arises when a VC contains multiple PhC's. The mask paths are hard to set, because they appear to apply to each PhC, when in fact you want one set of mask paths for one PhC, and another set for the other. You can do this by refering to the PhC alias when setting the mask path. For example, here are a set of mask paths to search only superior courts in all available Australasian databases:
<input type="hidden" name="meta" value="/austlii">
<input type="hidden" name="mask_au" value="au/cases/cth/high_ct">
<input type="hidden" name="mask_nz" value="nz/cases/NZCA">
<input type="hidden" name="mask_sp" value="fj/cases/">
<input type="hidden" name="mask_sp" value="vu/cases/">
Recall that the "/austlii" VC contains three PhC's: /au, /nz and /sp. We can't just list lots of "mask_path"s, because all mask_paths are applied to all PhC's. Instead we want to single out each PhC to set a mask path unique to it. So instead of "path" we use the PhC alias (or database alias) which we get from the VC List (chop off the leading "/"). And so we set the High Court mask path for the /au database, the New Zealand Court of Appeal for the /nz database, and the Fiji and Vanuatu case law databases (they only have superior courts) for the /sp database.
callback
db
legisopt
mask_path
mask_XXX
meta
method
On AustLII you may see a method labeled "case name". This is just a title method with a different label.
Definining multiple method parameters is undefined.
offset
query
<input type="text"
name="query">
however any text-based form element will do
(you could even use radio buttons to allow certain canned searches
to be done).
Depending on the method chosen the users actual search query will be modified before being passed on to the search engine.
rank
results
stats
syns