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
| Name | Constraint | Description |
| index.analyzer | Valid Analyzer class name (e.g. – org.apache.lucene.analysis.SimpleAnalyzer) | Default analyzer to be used within a particular index |
| index.author | Field for an index. | Determines the author of the index |
| index.defaultoperator | Gets this index's default operator. | |
| index.readonly | In the absence of an 'index.readonly' property, the index is assumed to NOT be read-only | Determines whether or not an index is read only. |
| index.summary | Retrieves a summary of the index. | |
| index.title | The 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.identifer | Field name | This field will be used to identify documents within an index |
| document.identifier.pattern | Regular expression | Determines 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.summary | Field name for a document | Retrieves a summary of the given document. |
| document.title | Field name for a document | Returns the field name for the title field. |
| document.updated | Field name for a document | Gets the field responsible for updated timestamp. |
| document.uri | Field name for a document | Retrieves a URI of the given document. |
| field.modified.format | Applies to a documents modified timestamp | Determine the format used for the timestamp of this document. |
| field.modified.lenient | Applies to a documents modified timestamp | Determines whether or not we are to be lenient. |
| field.modified.precision | Applies to a documents modified timestamp | Determines the precision of the time stamps in terms of milliseconds. |
| field.modified.timezone | Applies to a documents modified timestamp | Determines the timestamps time zone. |
| field.rights.name | Field name for a document. | Determines the rights of the document. |
