public interface AdminSolrMgrIf
Modifier and Type | Method and Description |
---|---|
void |
addAllProductsToSearchEngine(boolean async)
Loop through all of the products in the KonaKart database and add them to the Solr search
engine.
|
void |
addAllProductsToSearchEngineSync()
Loop through all of the products in the KonaKart database and add them to the Solr search
engine
|
void |
addProductToSearchEngine(int productId)
Add a single product referenced by productId to the Solr search engine
|
void |
addProductToSearchEngine(int productId,
java.lang.String storeId)
Add a single product referenced by productId to the Solr search engine.
|
boolean |
commitInCode()
Returns true if we should commit to Solr in code, otherwise it returns false
|
java.lang.StringBuffer |
getDocFromProduct(int productId,
java.lang.String storeId,
java.util.HashMap<java.lang.Integer,AdminLanguage> languageMap)
Create an XML string from the product object that can be passed to Solr
|
java.util.HashMap<java.lang.Integer,AdminLanguage> |
getLangMap()
Returns a HashMap mapping language id to language
|
int |
getSolrCommitFrequency()
The chunk size of records read from the database and written to SOLR after which a SOLR
commit command is sent.
|
java.net.URL |
getSolrUrl()
Derive a Solr Url from configuration variables.
|
void |
refreshConfigs()
Refresh the configuration of the Admin Solr Manager
|
void |
removeAllProductsFromSearchEngine(boolean async)
Remove all products from the Solr search engine.
|
void |
removeAllProductsFromSearchEngineSync()
Remove all products from the Solr search engine
|
void |
removeProductFromSearchEngine(int productId)
Remove a single product referenced by productId from the Solr search engine
|
void |
removeProductFromSearchEngine(int productId,
java.lang.String storeId)
Remove a single product referenced by productId from the Solr search engine.
|
boolean |
useSolr()
Returns true if Solr can be used, otherwise it returns false
|
void addAllProductsToSearchEngine(boolean async) throws java.lang.Exception
async
- If true, the API call runs asynchronously and control is returned immediatelyjava.lang.Exception
- an unexpected exceptionvoid addAllProductsToSearchEngineSync() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionvoid removeAllProductsFromSearchEngine(boolean async) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, java.lang.Exception
async
- If true we do it asynchronouslyorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)java.lang.Exception
- an unexpected exceptionvoid removeAllProductsFromSearchEngineSync() throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, java.lang.Exception
org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)java.lang.Exception
- an unexpected exceptionvoid removeProductFromSearchEngine(int productId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, java.lang.Exception
productId
- the productIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)java.lang.Exception
- an unexpected exceptionvoid removeProductFromSearchEngine(int productId, java.lang.String storeId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, java.lang.Exception
productId
- the productIdstoreId
- the storeIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)java.lang.Exception
- an unexpected exceptionvoid addProductToSearchEngine(int productId) throws java.lang.Exception
productId
- the productIdjava.lang.Exception
- an unexpected exceptionvoid addProductToSearchEngine(int productId, java.lang.String storeId) throws java.lang.Exception
productId
- the productIdstoreId
- the storeIdjava.lang.Exception
- an unexpected exceptionvoid refreshConfigs() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionboolean useSolr() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptioncom.konakart.app.KKException
- an unexpected KKException exceptionboolean commitInCode() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionint getSolrCommitFrequency()
java.util.HashMap<java.lang.Integer,AdminLanguage> getLangMap() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionjava.lang.StringBuffer getDocFromProduct(int productId, java.lang.String storeId, java.util.HashMap<java.lang.Integer,AdminLanguage> languageMap) throws java.lang.Exception
productId
- the productIdstoreId
- the storeIdlanguageMap
- the languageMapjava.lang.Exception
- an unexpected exceptionjava.net.URL getSolrUrl() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionCopyright © 2018 DS Data Systems UK Ltd.