Start

Searsia comes with a client and a server.

The client

The Searsia Web client can be downloaded as searsiaclient.zip and unzipped on your local machine or web server. To use the web client, open the file index.html in a web browser. Congratulations! You now run your own web application for federated search.

Client options

The client will automatically connect to the University of Twente search server. To connect to another server, edit the second line in the file js/searsia.js, which contains the API template of the server.

var API_TEMPLATE = 'https://search.utwente.nl/searsia/search?q={q?}&r={r?}'

If you run a server on your local machine (see next section), you can connect to your own server by setting the API template to: 'http://localhost:16842/searsia/search?q={q?}&r={r?}'

The server

Download the Java server searsiaserver.jar and use the following command to start the server:

java -jar searsiaserver.jar

The server requires Java 7 or higher. Just like the web client, the java server will automatically connect to the University of Twente search server. The server displays the following message:

Searsia Server v0.4.0
Connected to: utwente
API Template: http://localhost:16842/searsia/search?q={q?}&r={r?}
Use Ctrl+c to stop.

Use the reported API Template in your client as explained above to connect.

Server options

The java server supports several command line options, shown in the following table. For convenience, each option has a short-hand consisting of one hyphen and the first letter of the option, for instance -h for --help.

OptionExplanation
--help Show help.
--interval <arg> Takes as argument an integer, which is the poll interval (in seconds). The server sends a random query each interval to a search engine. The default value is 120 seconds. If your server contains 30 resources (search engines), a polling interval of 120 seconds will poll each resource on average once per 120 * 30 = 3600 seconds, so once each 60 minutes, about 24 queries a day. In scientific literature on distributed information retrieval, polling is usually called query-based sampling. An interval of 0 disables polling.
--log <arg>Takes as argument an integer, which is the type of log messages produced by the server (to the index directory). Supported levels are: 0 = no logging; 1 = only errors; 2 = errors and warnings; 3 = errors, warnings, and information, 4 = all of level 3 plus debug information. The default level is 2.
--mother <arg> Sets the API template of the mother. Use none to run the in stand-alone mode. The default is currently 'https://search.utwente.nl/searsia/search?q={q?}&r={r?}'.
--name <arg> Set the id (name) of this end point. The server generates a random string as its name if this setting is not provided.
--open Enable on-line updates. This enables on-line updates for your server by anyone, use this only for testing purposes.
--path <arg> Set the path on the file system where the index is stored. The default depends on your operating system. Typically, the index ends up in your home directory under: .local/share/searsia if your are on a Linux-based system, under Library/Application Support/Searsia if you are on Apple, and under Application Data/Searsia on many Windows versions.
--url <arg> Set the url of the web service endpoint. The default is 'http://localhost:16842/searsia/'

Server trouble shooting

The server might return the following error messages:
  • Setup failed: Cannot create directory:
    The server cannot create the index. Check if the server has write premissions in the reported directory. Use the --path option to change the location of the index.
  • Setup failed: Lock obtain timed out: NativeFSLock
    There is already an instance of the Searsia server running on the same index. Kill the server, or run the server with a different name with the --name option.
  • Server failed: Failed to start Grizzly HTTP server: Address already in use
    There is already running an instance of the Searsia server on the same url. Kill the server, or run the server on a different url or port number with the --url option.
  • Server failed: Failed to start Grizzly HTTP server: Unresolved address, or
    Server failed: Failed to start Grizzly HTTP server: Permission denied
    The provided url is invalid, or the url does not belong to the machine that runs the server, or the port is blocked or taken by another application. Change the url with the --url option.
  • Error: Local id conflict, or
    Error: The server id 'X' already exists.
    This usually happens if you give your engine a name with the --name option that is already used by the mother. Give your server another name.
  • Error: Connection failed: java.net.UnknownHostException, or
    Error: Connection failed: java.io.FileNotFoundException, or
    Error: Mother id conflict
    Connection to the mother failed. Check your internet connection. Check the mother engine and mother template. Change the mother template with the --mother option.
  • Error: Connection failed: org.json.JSONException
    The mother is not a Searsia engine. Check the mother engine and mother template. Change the mother with the --mother option.

Download Searsia

Thanks, Github!