public CgiArguments(String uriQuery) {
		String[] params = uriQuery.split("&");
		for (String param : params) {
			String[] keyval = param.split("=", 2);
			if (keyval.length < 2) {
				continue;
			}
			String key = keyval[0].toLowerCase();
			String val = keyval[1];
			if (key.equals("query")) {
				_query = val;
			} else if (key.equals("num")) {
				try {
					_numResults = Integer.parseInt(val);
				} catch (NumberFormatException e) {
					// Ignored, search engine should never fail upon invalid
					// user input.
				}
			} else if (key.equals("ranker")) {
				try {
					_rankerType = RankerType.valueOf(val.toUpperCase());
				} catch (IllegalArgumentException e) {
					// Ignored, search engine should never fail upon invalid
					// user input.
				}
			} else if (key.equals("format")) {
				try {
					_outputFormat = OutputFormat.valueOf(val.toUpperCase());
				} catch (IllegalArgumentException e) {
					// Ignored, search engine should never fail upon invalid
					// user input.
				}
			}
		} // End of iterating over params
	}