railo.runtime.search.lucene2.docs
Class FileDocument
java.lang.Object
railo.runtime.search.lucene2.docs.FileDocument
public final class FileDocument
- extends Object
A utility for making Lucene Documents from a File.
getDocument
public static org.apache.lucene.document.Document getDocument(Resource res,
String charset)
throws IOException
- Makes a document for a File.
The document has three fields:
path
--containing the pathname of the file, as a stored,
tokenized field;
modified
--containing the last modified date of the file as
a keyword field as encoded by DateField; and
contents
--containing the full contents of the file, as a
Reader field;
- Parameters:
res
-
- Returns:
- matching document
- Throws:
IOException
getDocument
public static org.apache.lucene.document.Document getDocument(StringBuffer content,
Reader r)
throws IOException
- Throws:
IOException
Copyright © 2012 Railo