|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectccc.plugins.search.lucene.SimpleLuceneFS
public class SimpleLuceneFS
Implementation of SimpleLucene
operating on a file system index.
Constructor Summary | |
---|---|
SimpleLuceneFS(java.lang.String indexPath)
Constructor. |
Method Summary | |
---|---|
void |
commitUpdate()
Commit a transaction. |
void |
createDocument(java.util.UUID id,
ResourcePath path,
ResourceName name,
java.lang.String title,
java.util.Set<java.lang.String> tags,
java.lang.String content,
java.util.Set<Paragraph> paragraphs)
Add a document to the search index. |
TextExtractor |
createExtractor(MimeType mimeType)
Creates a text extractor for PDF, Word and plain text files. |
SearchResult |
find(java.lang.String searchTerms,
int nofOfResultsPerPage,
int pageNo)
Find the results that match the specified search terms. |
SearchResult |
find(java.lang.String searchTerms,
java.lang.String sort,
SortOrder order,
int nofOfResultsPerPage,
int pageNo)
Find the results that match the specified search terms. |
void |
rollbackUpdate()
Roll back a transaction. |
SearchResult |
similar(java.lang.String uuid,
int nofOfResultsPerPage,
int pageNo)
Find the results that are similar to the specified page. |
void |
startUpdate()
Start a transaction. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleLuceneFS(java.lang.String indexPath)
indexPath
- The path to the index file on disk.Method Detail |
---|
public SearchResult find(java.lang.String searchTerms, int nofOfResultsPerPage, int pageNo)
find
in interface Index
searchTerms
- The terms to match.nofOfResultsPerPage
- The number of results to return.pageNo
- The page of results to return (first page has index of 0).
public SearchResult find(java.lang.String searchTerms, java.lang.String sort, SortOrder order, int nofOfResultsPerPage, int pageNo)
find
in interface Index
searchTerms
- The terms to match.sort
- The field to sort on.order
- The order of the sort.nofOfResultsPerPage
- The number of results to return.pageNo
- The page of results to return (first page has index of 0).
public SearchResult similar(java.lang.String uuid, int nofOfResultsPerPage, int pageNo)
similar
in interface Index
uuid
- The UUID of the page to compare.nofOfResultsPerPage
- The number of results to return.pageNo
- The page of results to return (first page has index of 0).
public void commitUpdate()
commitUpdate
in interface Indexer
public void rollbackUpdate()
rollbackUpdate
in interface Indexer
public void startUpdate()
startUpdate
in interface Indexer
public void createDocument(java.util.UUID id, ResourcePath path, ResourceName name, java.lang.String title, java.util.Set<java.lang.String> tags, java.lang.String content, java.util.Set<Paragraph> paragraphs)
createDocument
in interface Indexer
id
- The resource's ID.path
- The resource's absolute path.name
- The resource's name.title
- The resource's title.tags
- The resource's tags.content
- The document's content.paragraphs
- The paragraphs of the document.public TextExtractor createExtractor(MimeType mimeType)
createExtractor
in interface Indexer
mimeType
- MimeType used to match the file.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |