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 bulkIndexDocuments(List<RequestDocument> requestDocuments, boolean isCommit)
          Method to bulk Index Documents
 void cleanupDiscoveryData()
           
 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 indexDocuments(List<RequestDocument> requestDocuments)
           
 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)
           
 org.apache.solr.client.solrj.response.QueryResponse searchBibRecord(String docCat, String docType, String docFormat, String fieldName, String fieldValue, String fieldList)
           
 

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)

indexDocument

String indexDocument(RequestDocument requestDocument)

indexSolrDocuments

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

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


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