Index.Properties API

GET

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

Request

GET /lucene/test/index.properties HTTP/1.1
Host: localhost:8080

Response

HTTP/1.x 200 OK
Etag: Wed, 01 Feb 2006 09:35:31 AST
Last-Modified: Wed, 01 Feb 2006 09:35:31 AST
Content-Type: application/atom+xml;charset=utf-8

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
	<title>Properties of 'My test index'</title>
	<updated>2006-02-01T09:35:31-04:00</updated>
	<author>
		<name>Lucene Web Service</name>
	</author>
	<id>http://localhost:8080/lucene/test/index.properties</id>
	<content type="xhtml">
		<div xmlns="http://www.w3.org/1999/xhtml">
			<dl class="xoxo">
				<dt>document.identifier</dt>
				<dd>id</dd>
				<dt>document.summary</dt>
				<dd>text</dd>
				<dt>document.defaultfield</dt>
				<dd>text</dd>
				<dt>document.title</dt>
				<dd>[text]</dd>
				<dt>index.title</dt>
				<dd>My test index</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/test/index.properties HTTP/1.1
Host: localhost:8080

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

Response

HTTP/1.x 200 OK
Location: http://localhost:8080/lucene/test/index.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/test/index.properties</id>
	<summary>OK</summary>
</entry>

Errors

403 Forbidden

The index has been configured to disallow modifications to the index.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/test/index.properties HTTP/1.1
Host: localhost:8080

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
	<title>Update Index.Properties</title>
	<content type="xhtml">
		<div xmlns="http://www.w3.org/1999/xhtml">
			<dl class="xoxo">
				<dt>document.identifier</dt>
				<dd>id</dd>
				<dt>document.summary</dt>
				<dd>text</dd>
				<dt>document.defaultfield</dt>
				<dd>text</dd>
				<dt>document.title</dt>
				<dd>[text]</dd>
				<dt>index.title</dt>
				<dd>My updated test index</dd>
			</dl>
		</div>
	</content>
</entry>

Response

HTTP/1.x 200 OK
Location: http://localhost:8080/lucene/test/index.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/test/index.properties</id>
	<summary>OK</summary>
</entry>

Errors

403 Forbidden

The index has been configured to disallow modifications to the index.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
index.analyzerValid Analyzer class name (e.g. – org.apache.lucene.analysis.SimpleAnalyzer)Default analyzer to be used within a particular index
index.authorField for an index.Determines the author of the index
index.defaultoperatorGets this index's default operator.
index.readonlyIn the absence of an 'index.readonly' property, the index is assumed to NOT be read-onlyDetermines whether or not an index is read only.
index.summaryRetrieves a summary of the index.
index.titleThe title of an index. Defaults to the directory name
index.default.names Retrieves the default fields associated with the index.
index.properties File in which all of the index related properties are stored.
document.identiferField nameThis field will be used to identify documents within an index
document.identifier.patternRegular expressionDetermines whether or not a document possesses a valid document.identifier. The identifier is checked against the regular expression contained within the "document.identifier.pattern" property. If such a regular expression does not exist, then the document.identifier will be accepted.
document.summaryField name for a documentRetrieves a summary of the given document.
document.titleField name for a documentReturns the field name for the title field.
document.updatedField name for a documentGets the field responsible for updated timestamp.
document.uriField name for a documentRetrieves a URI of the given document.
field.modified.formatApplies to a documents modified timestampDetermine the format used for the timestamp of this document.
field.modified.lenientApplies to a documents modified timestampDetermines whether or not we are to be lenient.
field.modified.precisionApplies to a documents modified timestampDetermines the precision of the time stamps in terms of milliseconds.
field.modified.timezoneApplies to a documents modified timestampDetermines the timestamps time zone.
field.rights.nameField name for a document.Determines the rights of the document.