public class WebLogWriter extends java.lang.Object implements DocWriter
Document
that holds
information about a client request to an HTTP servlet. Document
fields that are
created by this class are: requestdate
- The date of the client request. Stored.
requesturl
- The URL and query the client requested.
Stored.remotehost
- The requesting client's host name or IP
address. Stored.notes
- Free text notes related to this log entry.
Stored.doctype
- The document format type, which is 'weblog,'
with '0' appended to support wildcard searching.readerclass
- The class which is used to read Document
s created by this writer, which is
'WebLogReader'.admindefaultfield
- The default field that holds all content for searching.
'WebLogReader'.WebLogReader
Constructor and Description |
---|
WebLogWriter()
Constructor for the WebLogWriter object
|
Modifier and Type | Method and Description |
---|---|
protected void |
addToAdminDefaultField(java.lang.String value,
java.lang.StringBuffer adminDefaultBuffer)
Adds the given String to a text field referenced in the index by the field
name 'default'.
|
java.lang.String |
getDocType()
Gets doctype, which is "weblog".
|
java.lang.String |
getReaderClass()
Gets the name of the concrete
DocReader
class that is used to read this type of Document , which is "WebLogReader". |
org.apache.lucene.document.Document |
log(javax.servlet.http.HttpServletRequest request)
Create a log entry Document.
|
org.apache.lucene.document.Document |
log(javax.servlet.http.HttpServletRequest request,
java.lang.String notes)
Create a log entry Document, storing and indexing the given notes.
|
public java.lang.String getDocType()
getDocType
in interface DocWriter
public java.lang.String getReaderClass()
DocReader
class that is used to read this type of Document
, which is "WebLogReader".getReaderClass
in interface DocWriter
public final org.apache.lucene.document.Document log(javax.servlet.http.HttpServletRequest request)
request
- The HTTP request.public final org.apache.lucene.document.Document log(javax.servlet.http.HttpServletRequest request, java.lang.String notes)
request
- The HTTP request.notes
- Notes about this web log entry.protected final void addToAdminDefaultField(java.lang.String value, java.lang.StringBuffer adminDefaultBuffer)
value
- A text string to be added to the indexed field named
'default.'adminDefaultBuffer
- The feature to be added to the ToDefaultField
attribute