The comminucation between the Commerce box and the Search engine is through SOAP. Read more about this architecture @ http://tips4ufromsony.blogspot.in/2011/11/atg-search-architectural-flow-search.html
The commerce instance forms the SOAP url just like the below code:
private URL getSearchEngineURL(SearchEngine engine) {
SearchEnvironmentHost h = engine.getSearchEnvironmentHost();
SearchMachine hi = h.getSearchMachine() ;
return new URL("http://" + hi.getHostname() + ":" + engine.getPort() + "/AEXmlService/");
}
So the commerce instance need the hi.getHostname() and engine.getPort() to form the url. It is obtained as below:
1. The component /atg/commerce/search/refinement/CommerceFacetSearchService has the siteName defined, which will be pointing to the environment name defined in the Search Project. Read more about this search project setup @ http://tips4ufromsony.blogspot.in/2012/01/atg-search-how-to-create-search-project.html
siteName=SearchProjectLocal
2. By using the above siteName, the commerce instance will obtain the search enigne hostbox name just like the below query :
select * from rout_host_inf where id =( select host_info_id from rout_host where parent_env_id = ( select id from rout_env where env_name = 'SearchProjectLocal' ) ) --> The hi.getHostname() got from here
3. By using the above siteName, the commerce instance will obtain the search enigne hostbox name just like the below query :
select * from rout_engine where host_id = (select id from rout_host where parent_env_id = (select id from rout_env where env_name = 'SearchProjectLocal')) --> The engine.getPort() got from here
Read how to make the SOAP call to search engine using SOAP UI @ http://tips4ufromsony.blogspot.in/2012/01/how-can-we-use-soap-ui-to-test-atg.html
The commerce instance forms the SOAP url just like the below code:
private URL getSearchEngineURL(SearchEngine engine) {
SearchEnvironmentHost h = engine.getSearchEnvironmentHost();
SearchMachine hi = h.getSearchMachine() ;
return new URL("http://" + hi.getHostname() + ":" + engine.getPort() + "/AEXmlService/");
}
So the commerce instance need the hi.getHostname() and engine.getPort() to form the url. It is obtained as below:
1. The component /atg/commerce/search/refinement/CommerceFacetSearchService has the siteName defined, which will be pointing to the environment name defined in the Search Project. Read more about this search project setup @ http://tips4ufromsony.blogspot.in/2012/01/atg-search-how-to-create-search-project.html
siteName=SearchProjectLocal
2. By using the above siteName, the commerce instance will obtain the search enigne hostbox name just like the below query :
select * from rout_host_inf where id =( select host_info_id from rout_host where parent_env_id = ( select id from rout_env where env_name = 'SearchProjectLocal' ) ) --> The hi.getHostname() got from here
3. By using the above siteName, the commerce instance will obtain the search enigne hostbox name just like the below query :
select * from rout_engine where host_id = (select id from rout_host where parent_env_id = (select id from rout_env where env_name = 'SearchProjectLocal')) --> The engine.getPort() got from here
Read how to make the SOAP call to search engine using SOAP UI @ http://tips4ufromsony.blogspot.in/2012/01/how-can-we-use-soap-ui-to-test-atg.html
How does the engine information get populated in the SearchConfigurationRepository for a remote store instance ?
ReplyDeleteBoth the remote store and CA ( content administrator or search administrator or ATG-BCC ) will point to the same SearchConfigurationRepository. So when the Search Project get created @ Search administrator, it will get reflected @ SearchConfigurationRepository with the new search engine information and if a new indexing happens, that information also get updated @ SearchConfigurationRepository.
ReplyDeleteHow do you delete a search project without using the UI?
ReplyDeleteYou need to remove the project from srch_project table and its ref. and child tables.
ReplyDeleteThe following set of queries might help you. Make sure that you use it wisely. :-)
--To delete a search project that is not created correctly:
select * from ROUT_INDEX order by est_start desc
delete from ROUT_INDEX where est_start is null
select * from rout_dep_hist where time_ended is null
delete from rout_dep_hist where time_ended is null
select * from rout_log_part where parent_index in ( select id from ROUT_INDEX where est_start is null)
delete from rout_log_part where parent_index in ( select id from ROUT_INDEX where est_start is null)
select * from rout_phys_part_m where log_part_id in ( select id from rout_log_part where parent_index in ( select id from ROUT_INDEX where est_start is null))
delete from rout_phys_part_m where log_part_id in ( select id from rout_log_part where parent_index in ( select id from ROUT_INDEX where est_start is null))
select * from rout_idx_log_parts where parent_index in ( select id from ROUT_INDEX where est_start is null)
delete from rout_idx_log_parts where parent_index in ( select id from ROUT_INDEX where est_start is null)
select * from srch_sync_task where srch_project_id = '1900001'
delete from srch_sync_task where srch_project_id = '1900001'
select * from srch_env_p_m where srch_project_id = '1900001'
delete from srch_env_p_m where srch_project_id = '1900001'
select * from srch_sync_task_def where srch_project_id = '1900001'
delete from srch_sync_task_def where srch_project_id = '1900001'
select * from srch_css_id_to_targ_ids where srch_project_id = '1900001'
delete from srch_css_id_to_targ_ids where srch_project_id = '1900001'
select * from srch_project where id = '1900001'
delete from srch_project where id = '1900001'
select * from srch_project_custom_ds
delete from srch_project_custom_ds where srch_project_id = '1900001'
select * from srch_project_custom_dsm
delete from srch_project_custom_dsm where srch_project_id = '1900001'
select * from rout_host
delete from rout_host
select * from rout_env
delete from rout_env
-- To delete and invalid search index to clean up:
select * from rout_dep_hist where new_index = 2100001
delete from rout_dep_hist where new_index = 2100001
select * from rout_idx_log_parts where parent_index =2100001
delete from rout_idx_log_parts where parent_index =2100001
select * from rout_phys_part_m where phys_part_id =2100001
delete from rout_phys_part_m where phys_part_id =2100001
select * from rout_log_part where parent_index = 2100001
DELETE from rout_log_part where parent_index = 2100001
select * from rout_part where id =2100001
delete from rout_part where id =2100001
select * from rout_index where id =2100001
delete from rout_index where id =2100001