org.kuali.ole.docstore.discovery.service
Interface IndexerService

All Known Implementing Classes:
DummyIndexerServiceImpl, IndexerServiceImpl

public interface IndexerService

Created by IntelliJ IDEA. User: tirumalesh.b Date: 30/11/11 Time: 11:44 AM


Field Summary
static String FAILURE
           
static String SUCCESS
           
 
Method Summary
 String bind(List<RequestDocument> requestDocument)
           
 String bulkIndexDocuments(List<RequestDocument> requestDocuments, boolean isCommit)
          Method to bulk Index Documents
 void cleanupDiscoveryData()
           
 void commit()
           
 String delete(List<RequestDocument> requestDocuments)
           
 String deleteDocument(String docCategory, String uuid)
          Deletes the document (if existing) with the given uuid.
 String deleteDocuments(String docCategory, List<String> uuidList)
          Deletes the documents (if existing) with the Ids specified in the given uuidList.
 List<org.apache.solr.common.SolrDocument> getSolrDocument(String fieldName, String fieldValue)
           
 List<org.apache.solr.common.SolrDocument> getSolrDocumentBySolrId(String uniqueId)
           
 String indexDocument(RequestDocument requestDocument)
           
 String indexDocument(RequestDocument requestDocument, boolean commit)
           
 String indexDocuments(List<RequestDocument> requestDocuments)
           
 String indexDocuments(List<RequestDocument> requestDocuments, boolean commit)
           
 String indexDocumentsFromDirBySolrDoc(String docCategory, String docType, String docFormat, String dataDir)
          Indexes the documents from the xml files in the given fileDir.
 String indexDocumentsFromFileBySolrDoc(String docCategory, String docType, String docFormat, String filePath)
           
 String indexDocumentsFromFiles(String docCategory, String docType, String docFormat, List<File> fileList)
           
 String indexDocumentsFromStringBySolrDoc(String docCategory, String docType, String docFormat, String data)
           
 String indexSolrDocuments(List<org.apache.solr.common.SolrInputDocument> solrDocs)
           
 void rollback()
           
 org.apache.solr.client.solrj.response.QueryResponse searchBibRecord(String docCat, String docType, String docFormat, String fieldName, String fieldValue, String fieldList)
           
 void transferInstances(List<RequestDocument> requestDocuments)
           
 void transferItems(List<RequestDocument> requestDocuments)
           
 String unbind(List<RequestDocument> requestDocuments)
           
 

Field Detail

SUCCESS

static final String SUCCESS
See Also:
Constant Field Values

FAILURE

static final String FAILURE
See Also:
Constant Field Values
Method Detail

deleteDocuments

String deleteDocuments(String docCategory,
                       List<String> uuidList)
                       throws MalformedURLException,
                              org.apache.solr.client.solrj.SolrServerException
Deletes the documents (if existing) with the Ids specified in the given uuidList.

Parameters:
docCategory -
uuidList -
Returns:
SUCCESS or FAILURE (with error id if any)
Throws:
MalformedURLException
org.apache.solr.client.solrj.SolrServerException

deleteDocument

String deleteDocument(String docCategory,
                      String uuid)
Deletes the document (if existing) with the given uuid.

Parameters:
docCategory -
uuid -
Returns:
SUCCESS or FAILURE (with error id if any)

indexDocumentsFromDirBySolrDoc

String indexDocumentsFromDirBySolrDoc(String docCategory,
                                      String docType,
                                      String docFormat,
                                      String dataDir)
Indexes the documents from the xml files in the given fileDir. Uses solrj API (SolrInputDocuments) instead of DIH (DataImportHandler). The name of xml files should be of the form "{uuid}_UUID_.xml", where {uuid} is the "id" field value for the document in the xml file. Otherwise a random uuid will be assigned for the document.

Parameters:
docCategory -
docType -
docFormat -
dataDir -
Returns:
SUCCESS ("success-N" where N is num of documents processed); FAILURE (with error id if any).

indexDocumentsFromStringBySolrDoc

String indexDocumentsFromStringBySolrDoc(String docCategory,
                                         String docType,
                                         String docFormat,
                                         String data)
                                         throws IOException
Throws:
IOException

indexDocumentsFromFileBySolrDoc

String indexDocumentsFromFileBySolrDoc(String docCategory,
                                       String docType,
                                       String docFormat,
                                       String filePath)

indexDocumentsFromFiles

String indexDocumentsFromFiles(String docCategory,
                               String docType,
                               String docFormat,
                               List<File> fileList)

indexDocuments

String indexDocuments(List<RequestDocument> requestDocuments)

indexDocuments

String indexDocuments(List<RequestDocument> requestDocuments,
                      boolean commit)

indexDocument

String indexDocument(RequestDocument requestDocument)

indexDocument

String indexDocument(RequestDocument requestDocument,
                     boolean commit)

indexSolrDocuments

String indexSolrDocuments(List<org.apache.solr.common.SolrInputDocument> solrDocs)

commit

void commit()
            throws Exception
Throws:
Exception

rollback

void rollback()
              throws Exception
Throws:
Exception

bulkIndexDocuments

String bulkIndexDocuments(List<RequestDocument> requestDocuments,
                          boolean isCommit)
Method to bulk Index Documents

Parameters:
requestDocuments -
Returns:

getSolrDocumentBySolrId

List<org.apache.solr.common.SolrDocument> getSolrDocumentBySolrId(String uniqueId)

getSolrDocument

List<org.apache.solr.common.SolrDocument> getSolrDocument(String fieldName,
                                                          String fieldValue)

searchBibRecord

org.apache.solr.client.solrj.response.QueryResponse searchBibRecord(String docCat,
                                                                    String docType,
                                                                    String docFormat,
                                                                    String fieldName,
                                                                    String fieldValue,
                                                                    String fieldList)

cleanupDiscoveryData

void cleanupDiscoveryData()
                          throws IOException,
                                 org.apache.solr.client.solrj.SolrServerException
Throws:
IOException
org.apache.solr.client.solrj.SolrServerException

bind

String bind(List<RequestDocument> requestDocument)
            throws Exception,
                   IOException
Throws:
Exception
IOException

unbind

String unbind(List<RequestDocument> requestDocuments)
              throws Exception
Throws:
Exception

transferInstances

void transferInstances(List<RequestDocument> requestDocuments)
                       throws Exception
Throws:
Exception

transferItems

void transferItems(List<RequestDocument> requestDocuments)
                   throws Exception
Throws:
Exception

delete

String delete(List<RequestDocument> requestDocuments)
              throws Exception
Throws:
Exception


Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.