Alkaline is an HTTP/1.0 compliant server. It requires you to specify what database you want to search
and what template you wish to use to output search results. This is done by specifying a server path
when performing a query. For example
http://foo.com:9999/bar/search.html
mean that the bar alias has to be searched and results should be shown using the search.html template.
Alternatively, you can specify a searchconfig
parameter and thus use the same
template for multiple configurations.
Forms can use both the POST and the GET methods.
In order to search a database, Alkaline must be running as a daemon.
A simple form is:
<form method="post"
action="http://server:port/foo/search.html">
<input type="text" name="search">
</form>
|
The above form assumes that Alkaline is running on a server
, bound to port
and that
the relative path foo
contains the asearch.cnf file, indexes and the search template
search.html
.
If either the path does not exist or the search template cannot be retrieved or is invalid, Alkaline will
respond with a 400/Bad Request.
The search form can contain the following additional fields:
Table 6-1. Predefined Form Fields
| host |
append a host: scope restriction entry to the search string |
| path |
append a path: scope restriction entry to the search string |
| url |
append an url: scope restriction entry to the search string |
| other |
append any additional value to the search string |
| quant |
specify the maximum number of results per page to show |
| before |
append a before: time scope restriction entry to the search string |
| after |
append an after: time scope restriction entry to the search string |
Example:
<form action="http://www.foo.com:8080/foo/search.html" method="post">
<input type="text" name="search" size="20">
<br>in
<select name="other">
<option value="">The Entire Site</option>
<option value="url:www.foo.com/doc/">Documentation</option>
</select>
<input type="submit" value="Search">
<br>modified after: <input type="text" size="10" name="after"> (example: 15.05.1999)
<br><input type="checkbox" name="other" value="opt:and"> match all terms</input>
<input type="checkbox" name="other" value="opt:case"> case sensitive</input>
<input type="checkbox" name="other" value="opt:whole"> whole words only</input>
<br>Show <select name="quant">
<option selected value="10">10</option>
<option value="20">20</option>
<option value="-1">all</option>
</select> results per page.
</form>
|