ccc.plugins.search
Interface Indexer

All Known Subinterfaces:
SimpleLucene
All Known Implementing Classes:
SimpleLuceneFS

public interface Indexer

API for rebuilding a search index.

Author:
Civic Computing Ltd.

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.
 void rollbackUpdate()
          Roll back a transaction.
 void startUpdate()
          Start a transaction.
 

Method Detail

startUpdate

void startUpdate()
Start a transaction.


commitUpdate

void commitUpdate()
Commit a transaction.


rollbackUpdate

void rollbackUpdate()
Roll back a transaction.


createDocument

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.

Parameters:
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.

createExtractor

TextExtractor createExtractor(MimeType mimeType)
Creates a text extractor for PDF, Word and plain text files.

Parameters:
mimeType - MimeType used to match the file.
Returns:
TextExtractor for the file or null if no matching found.


Copyright © 2010. All Rights Reserved.