source: subversion/sites/namefinder/www/search.xml @ 17445

Last change on this file since 17445 was 10369, checked in by david, 11 years ago

Limit searches to improve performance: (a) limit searches to 4 words max; (b) only search worldwide if not found near qualifying place when explicitly asked to; (c) present unqualified results just in order of rank, not precision, in order to avoid doing a second worldwide search.

File size: 661 bytes
Line 
1<?php
2
3include_once('preamble.php');
4include_once('search.php');
5
6/* Sessions are only used so that queries from the same user get logged in the same log file */
7session_start();
8
9/* note what we were asked for */
10if (! empty($_SERVER['REQUEST_URI'])) {
11  $db->log("VISITING {$_SERVER['REQUEST_URI']}");
12}
13
14/* get the url query parameters */
15$find = isset($_GET['find']) ? $_GET['find'] : '';
16$max = (int)(isset($_GET['max']) ? $_GET['max'] : $config['limit']);
17$anyoccurenceifnotlocal = isset($_GET['any']);
18
19/* do the deed */
20header("Content-type: text/xml; charset=UTF-8");
21echo search::xmlise($find, $max, $anyoccurenceifnotlocal);
22
23?>
Note: See TracBrowser for help on using the repository browser.