Package org.dlese.dpc.index.writer
Class WebLogWriter
java.lang.Object
org.dlese.dpc.index.writer.WebLogWriter
- All Implemented Interfaces:
DocWriter
Writes a Lucene
The Lucene
Document that holds
information about a client request to an HTTP servlet. The Lucene
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 Documents created by this writer, which is
'WebLogReader'.admindefaultfield - The default field that holds all content for searching.
'WebLogReader'.- Author:
- John Weatherley
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidaddToAdminDefaultField(String value, StringBuffer adminDefaultBuffer) Adds the given String to a text field referenced in the index by the field name 'default'.Gets doctype, which is "weblog".Gets the name of the concreteDocReaderclass that is used to read this type ofDocument, which is "WebLogReader".final org.apache.lucene.document.Documentlog(HttpServletRequest request) Create a log entry Document.final org.apache.lucene.document.Documentlog(HttpServletRequest request, String notes) Create a log entry Document, storing and indexing the given notes.
-
Constructor Details
-
WebLogWriter
public WebLogWriter()Constructor for the WebLogWriter object
-
-
Method Details
-
getDocType
Gets doctype, which is "weblog".- Specified by:
getDocTypein interfaceDocWriter- Returns:
- The String "weblog".
-
getReaderClass
Gets the name of the concreteDocReaderclass that is used to read this type ofDocument, which is "WebLogReader".- Specified by:
getReaderClassin interfaceDocWriter- Returns:
- The String "WebLogReader".
-
log
Create a log entry Document.- Parameters:
request- The HTTP request.- Returns:
- A Document for indexing the request.
-
log
Create a log entry Document, storing and indexing the given notes.- Parameters:
request- The HTTP request.notes- Notes about this web log entry.- Returns:
- A Document for indexing the request.
-
addToAdminDefaultField
Adds the given String to a text field referenced in the index by the field name 'default'. The default field may be used in queries to quickly search for text across fields. This method should be called from the addCustomFields of implementing classes.- Parameters:
value- A text string to be added to the indexed field named 'default.'adminDefaultBuffer- The feature to be added to the ToDefaultField attribute
-