Service.Properties API

GET

This will fetch an Atom Entry with XOXO formatted content that lists the current properties for the service. This resource supports ETag/If-None-Match and Last-Modified/If-Modified-Since headers.

Request

GET /lucene/service.properties HTTP/1.1
Host: localhost:8080

Response

HTTP/1.x 200 OK
Content-Type: application/atom+xml;charset=utf-8
ETag: Fri, 24 Feb 2006 12:08:53 AST
Last-Modified: Fri, 24 Feb 2006 12:08:53 AST

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
	<title>Lucene Web Service</title>
	<updated>2006-02-24T12:08:53-04:00</updated>
	<author>
		<name>Lucene Web Service</name>
	</author>
	<id>http://localhost:8080/lucene/service.properties</id>
	<content type="xhtml">
		<div xmlns="http://www.w3.org/1999/xhtml">
			<dl class="xoxo">
				<dt>indices.directories</dt>
				<dd>/var/lucene/</dd>
				<dt>service.defaultfield</dt>
				<dd>all</dd>
				<dt>service.debugging</dt>
				<dd>false</dd>
				<dt>title</dt>
				<dd>Lucene Web Service</dd>
			</dl>
		</div>
	</content>
</entry>

Errors

500 Internal Server Error

There was a problem with the Lucene Webservice or one of it's dependencies. No action is required on the part of the client.

POST

Using POST will allow you to create and update properties.

Request

POST /lucene/service.properties HTTP/1.1
Host: localhost:8080

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
	<title>Update Service.Properties</title>
	<content type="xhtml">
		<div xmlns="http://www.w3.org/1999/xhtml">
			<dl class="xoxo">
				<dt>service.debugging</dt>
				<dd>true</dd>
			</dl>
		</div>
	</content>
</entry>

Response

HTTP/1.x 200 OK
Location: http://localhost:8080/lucene/service.properties
Content-Type: application/atom+xml;charset=utf-8

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
	<title>OK</title>
	<updated>2006-02-27T22:34:32-04:00</updated>
	<id>http://localhost:8080/lucene/service.properties</id>
	<summary>OK</summary>
</entry>

Errors

403 Forbidden

The service has been configured to disallow modifications to the service.properties file.

500 Internal Server Error

There was a problem with the Lucene Webservice or one of it's dependencies. No action is required on the part of the client.

PUT

PUT differs from POST in that it will replace the entire list of properties with the one you provide.

Request

PUT /lucene/service.properties HTTP/1.1
Host: localhost:8080

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
	<title>Update Service.Properties</title>
	<content type="xhtml">
		<div xmlns="http://www.w3.org/1999/xhtml">
			<dl class="xoxo">
				<dt>indices.directories</dt>
				<dd>/var/lucene/</dd>
				<dt>service.defaultfield</dt>
				<dd>all</dd>
				<dt>service.debugging</dt>
				<dd>true</dd>
				<dt>title</dt>
				<dd>Lucene Web Service</dd>
			</dl>
		</div>
	</content>
</entry>

Response

HTTP/1.x 200 OK
Location: http://localhost:8080/lucene/service.properties
Content-Type: application/atom+xml;charset=utf-8

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
	<title>OK</title>
	<updated>2006-02-27T22:36:20-04:00</updated>
	<id>http://localhost:8080/lucene/service.properties</id>
	<summary>OK</summary>
</entry>

Errors

403 Forbidden

The service has been configured to disallow modifications to the service.properties file.

500 Internal Server Error

There was a problem with the Lucene Webservice or one of it's dependencies. No action is required on the part of the client.

Available Properties

NameConstraintDescription
service.titleThe title of service. Defaults to "Lucene Web Service vX.X.X"
service.defaultfieldA valid field for the QueryParser?Provides a global default field to be used when searching
index.directoriesSemi-colon delimited list of directory pathsA set of directories within which will be the indices. Left-most directories have higher priority than right-most. New indices are created in the left-most directory
service.debuggingBoolean valueAny value other than 1, true or yes is considered false
service.operatorAccepts string values of 'and' and 'or'.(Ignore quotes) and it is not case sensitiveDetermines the service-wide default operator to be used as a last resort when searching
service.image.urlString valueAccepts a String value of a URL that identifies the location of an image that can be used in association with this search content.
service.image.heightString value of height in pixelsAccepts an image's width which will be parsed to an integer
service.image.widthString value of width in pixelsAccepts an image's height which will be parsed to an integer
service.image.typeString value MIME-TYPE Accepts an image type such as gif, jpg, etc.