Home « Server software «
Documentation: services/search.php
services/search.php - Process remote search requests
There are two patterns of usage for this script.This script implements the back-end part of the Simple Search RSS API.
The first pattern usage is the creation of taylored newsfeeds. Surfers will get news on submitted keywords each time a new matching article will pop up of the target server.
The second pattern usage is the extension of search requests to peering servers. Suppose that several YACS servers are involved into the same cloud of servers. One of them, called the Master, is manually requested by a web surfer to search on some keywords. Aside from pages found locally, the Master will also submit the request to other servers, called Peers. Peers are listed in the database of the Master.
This web service is based purely on the REST architecture for simplicity. The request is an usual HTTP GET or POST message, using words as parameters. No need for XML here. No authentication either, since the caller is identified by its network address.
This script accepts following parameters:
* search - One or several words that are looked for. Normally all words have to be present for an item to match. This parameter is mandatory.
* categories - A list of categories used to limit the search - Not implemented at the moment
* type - Either '
articles', 'files', 'images',
'links', 'comments' or 'users'.
By default this parameter is set to 'articles'.The response is a list of matching articles encoded with RSS. Only public items are searched.
This script is a reference file of this system.
Voir aussi:
Licence: GNU Lesser General Public License
Auteurs:
- Bernard Paques bernard.paques@bigfoot.com