org.kuali.ole.solr
Class DummyIndexerServiceImpl

java.lang.Object
  extended by org.kuali.ole.solr.DummyIndexerServiceImpl
All Implemented Interfaces:
IndexerService

public class DummyIndexerServiceImpl
extends Object
implements IndexerService

Created by IntelliJ IDEA. User: ND6967 Date: 3/14/12 Time: 7:34 PM To change this template use File | Settings | File Templates.


Field Summary
 
Fields inherited from interface org.kuali.ole.docstore.discovery.service.IndexerService
FAILURE, SUCCESS
 
Method Summary
 String bulkIndexDocuments(List<RequestDocument> requestDocumentList, boolean isCommit)
          Method to bulk Index Documents
 void cleanupDiscoveryData()
           
 void commit()
           
 String deleteDocument(String s, String s1)
          Deletes the document (if existing) with the given uuid.
 String deleteDocuments(String s, List<String> strings)
          Deletes the documents (if existing) with the Ids specified in the given uuidList.
static DummyIndexerServiceImpl getInstance()
           
 List<org.apache.solr.common.SolrDocument> getSolrDocument(String s, String s1)
           
 List<org.apache.solr.common.SolrDocument> getSolrDocumentBySolrId(String s)
           
 String indexDocument(RequestDocument requestDocument)
           
 String indexDocument(RequestDocument requestDocument, boolean commit)
           
 String indexDocuments(List<RequestDocument> requestDocumentList)
           
 String indexDocuments(List<RequestDocument> requestDocumentList, boolean commit)
           
 String indexDocumentsFromDirBySolrDoc(String s, String s1, String s2, String s3)
          Indexes the documents from the xml files in the given fileDir.
 String indexDocumentsFromFileBySolrDoc(String s, String s1, String s2, String s3)
           
 String indexDocumentsFromFiles(String s, String s1, String s2, List<File> files)
           
 String indexDocumentsFromStringBySolrDoc(String s, String s1, String s2, String s3)
           
 String indexSolrDocuments(List<org.apache.solr.common.SolrInputDocument> solrDocs)
           
 void rollback()
           
 org.apache.solr.client.solrj.response.QueryResponse searchBibRecord(String s, String s1, String s2, String s3, String s4, String s5)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static DummyIndexerServiceImpl getInstance()

deleteDocuments

public String deleteDocuments(String s,
                              List<String> strings)
Description copied from interface: IndexerService
Deletes the documents (if existing) with the Ids specified in the given uuidList.

Specified by:
deleteDocuments in interface IndexerService
Returns:
SUCCESS or FAILURE (with error id if any)

deleteDocument

public String deleteDocument(String s,
                             String s1)
Description copied from interface: IndexerService
Deletes the document (if existing) with the given uuid.

Specified by:
deleteDocument in interface IndexerService
Returns:
SUCCESS or FAILURE (with error id if any)

indexDocumentsFromFileBySolrDoc

public String indexDocumentsFromFileBySolrDoc(String s,
                                              String s1,
                                              String s2,
                                              String s3)
Specified by:
indexDocumentsFromFileBySolrDoc in interface IndexerService

indexDocumentsFromDirBySolrDoc

public String indexDocumentsFromDirBySolrDoc(String s,
                                             String s1,
                                             String s2,
                                             String s3)
Description copied from interface: IndexerService
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.

Specified by:
indexDocumentsFromDirBySolrDoc in interface IndexerService
Returns:
SUCCESS ("success-N" where N is num of documents processed); FAILURE (with error id if any).

indexDocumentsFromStringBySolrDoc

public String indexDocumentsFromStringBySolrDoc(String s,
                                                String s1,
                                                String s2,
                                                String s3)
                                         throws IOException
Specified by:
indexDocumentsFromStringBySolrDoc in interface IndexerService
Throws:
IOException

indexDocumentsFromFiles

public String indexDocumentsFromFiles(String s,
                                      String s1,
                                      String s2,
                                      List<File> files)
Specified by:
indexDocumentsFromFiles in interface IndexerService

getSolrDocumentBySolrId

public List<org.apache.solr.common.SolrDocument> getSolrDocumentBySolrId(String s)
Specified by:
getSolrDocumentBySolrId in interface IndexerService

getSolrDocument

public List<org.apache.solr.common.SolrDocument> getSolrDocument(String s,
                                                                 String s1)
Specified by:
getSolrDocument in interface IndexerService

searchBibRecord

public org.apache.solr.client.solrj.response.QueryResponse searchBibRecord(String s,
                                                                           String s1,
                                                                           String s2,
                                                                           String s3,
                                                                           String s4,
                                                                           String s5)
Specified by:
searchBibRecord in interface IndexerService

cleanupDiscoveryData

public void cleanupDiscoveryData()
                          throws IOException,
                                 org.apache.solr.client.solrj.SolrServerException
Specified by:
cleanupDiscoveryData in interface IndexerService
Throws:
IOException
org.apache.solr.client.solrj.SolrServerException

bulkIndexDocuments

public String bulkIndexDocuments(List<RequestDocument> requestDocumentList,
                                 boolean isCommit)
Description copied from interface: IndexerService
Method to bulk Index Documents

Specified by:
bulkIndexDocuments in interface IndexerService
Returns:

indexDocument

public String indexDocument(RequestDocument requestDocument)
Specified by:
indexDocument in interface IndexerService

indexDocument

public String indexDocument(RequestDocument requestDocument,
                            boolean commit)
Specified by:
indexDocument in interface IndexerService

indexDocuments

public String indexDocuments(List<RequestDocument> requestDocumentList)
Specified by:
indexDocuments in interface IndexerService

indexDocuments

public String indexDocuments(List<RequestDocument> requestDocumentList,
                             boolean commit)
Specified by:
indexDocuments in interface IndexerService

indexSolrDocuments

public String indexSolrDocuments(List<org.apache.solr.common.SolrInputDocument> solrDocs)
Specified by:
indexSolrDocuments in interface IndexerService

commit

public void commit()
            throws Exception
Specified by:
commit in interface IndexerService
Throws:
Exception

rollback

public void rollback()
              throws Exception
Specified by:
rollback in interface IndexerService
Throws:
Exception


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