public interface SolrMgrIf
Modifier and Type | Method and Description |
---|---|
java.lang.String |
escapeSearchString(java.lang.String searchString)
The Lucene search engine requires the following characters to be escaped: + - ! ( ) { } [ ] ^
" ~ * ? : \
|
java.lang.String |
getSolrUrl()
Get the Solr URL.
|
SuggestedSearchItem[] |
getSuggestedSearchItems(java.lang.String sessionId,
SuggestedSearchOptionsIf options)
Method that uses SOLR Terms in order to get suggested search data based on a search string.
|
SuggestedSpellingItem[] |
getSuggestedSpellingItems(java.lang.String sessionId,
SuggestedSpellingOptionsIf options)
Method that uses SOLR in order to get suggested spelling data based on a search string.
|
SolrProducts |
parseReply(java.lang.String xmlReply,
ProductSearchIf prodSearch,
int langId)
A DOM structure is created from the XML reply.
|
void |
refreshConfigs()
Get the config variables needed to setup the Solr mgr
|
void |
removeProductFromSearchEngine(int productId)
Remove a single product referenced by productId from the Solr search engine
|
SolrProducts |
searchForProducts(java.lang.String sessionId,
DataDescriptorIf dataDesc,
ProductSearchIf prodSearch,
int priceId,
int languageId,
FetchProductOptionsIf options)
This method only gets called if the Solr search engine is activated
|
java.lang.String |
sendQueryToSolr(java.lang.String query,
int type,
java.lang.String action)
Sends the query to Solr.
|
java.lang.String |
sendQueryToSolr(java.lang.String query,
int type,
java.lang.String action,
int attempt)
Sends the query to Solr
|
boolean |
useSolr()
Returns true if Solr can be used, otherwise it returns false
|
SolrProducts searchForProducts(java.lang.String sessionId, DataDescriptorIf dataDesc, ProductSearchIf prodSearch, int priceId, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIddataDesc
- the dataDescprodSearch
- the prodSearchpriceId
- the priceIdlanguageId
- the languageIdoptions
- the optionsjava.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 exceptionSuggestedSearchItem[] getSuggestedSearchItems(java.lang.String sessionId, SuggestedSearchOptionsIf options) throws java.lang.Exception
sessionId
- May be left nulloptions
- the optionscom.konakart.app.KKException
- an unexpected KKException exceptionjava.lang.Exception
- an unexpected exceptionSuggestedSpellingItem[] getSuggestedSpellingItems(java.lang.String sessionId, SuggestedSpellingOptionsIf options) throws java.lang.Exception
sessionId
- May be left nulloptions
- the optionsjava.lang.Exception
- an unexpected exceptionvoid refreshConfigs() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionboolean useSolr() throws com.konakart.app.KKException
com.konakart.app.KKException
- an unexpected KKException exceptionjava.lang.String escapeSearchString(java.lang.String searchString)
searchString
- the searchStringjava.lang.String sendQueryToSolr(java.lang.String query, int type, java.lang.String action) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, java.lang.Exception
query
- The parameters for the HTTP GETtype
- The type of queryaction
- The action for the query. Type is ignored if action is not null.java.lang.Exception
- an unexpected exceptioncom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)java.lang.String sendQueryToSolr(java.lang.String query, int type, java.lang.String action, int attempt) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, java.lang.Exception
query
- The parameters for the HTTP GETtype
- The type of queryaction
- The action for the query. Type is ignored if action is not null.attempt
- indicates the attempt number when Solr calls are retriedjava.lang.Exception
- an unexpected exceptioncom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)SolrProducts parseReply(java.lang.String xmlReply, ProductSearchIf prodSearch, int langId) throws java.lang.Exception
xmlReply
- the xmlReplyprodSearch
- the prodSearchlangId
- the langIdjava.lang.Exception
- an unexpected exceptionjava.lang.String getSolrUrl() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionCopyright © 2018 DS Data Systems UK Ltd.