Skip to main content

ATG Search - how estore(commerce instance) forms the search engine SOAP URL ?

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

Comments

  1. How does the engine information get populated in the SearchConfigurationRepository for a remote store instance ?

    ReplyDelete
  2. Both 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.

    ReplyDelete
  3. How do you delete a search project without using the UI?

    ReplyDelete
  4. You need to remove the project from srch_project table and its ref. and child tables.

    The 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

    ReplyDelete

Post a Comment

Popular posts from this blog

How to convert your Blogger Blog to PDF ?

You can use a website called "blogbooker" @  http://www.blogbooker.com/blogger.php   to convert your Blogger Blog to a PDF . Please find the steps below : 1. Save your blog as an xml using Blogger Settings - Other - Export Blog option 2. Go to the website " http://www.blogbooker.com/blogger.php " and select this XML , give your blog address and select the options like date range, page size, font, ... 3. Click the  "Create Your BlogBook" button to view and save your blog as PDF

Eclipse plug-in to create Class and Sequence diagrams

ModelGoon is an Eclipse plug-in avaiable for UML diagram generation from Java code. It can be used to generate Package Dependencies Diagram, Class Diagram, Interaction Diagram and Sequence Diagram. You coud get it from http://marketplace.eclipse.org/content/modelgoon-uml4java Read more about it and see some vedios about how to create the class and sequence diagram @ http://www.modelgoon.org/?tag=eclipse-plugin Find some snapshots below which gives an idea about the diagram generation.

ATG Search - search engine tuning settings

In this blog, I am going to list the best tuning settings for ATG Search engine. The AESoapConfig.xml, AESoapWaspConfig.xml  and AEConfig.xml are the xmls referred below and you can find it @  <ATG_DIR>\<Searchx.x>\SearchEngine\<operating_system>\bin\ folder. (1)  Make sure that the AESoapConfig.xml's rwTimeout is less than or equal to routing's readTimeoutMs. You could find the routing's readTimeoutMs @ atg\search\routing\SearchEngineService component.               rwTimeout is the  length of time in seconds to wait before a read or write operation times out on an active connection. The number can be decreased to improve performance. However, a value that is too low could cause slow connections to be prematurely closed. (2)  Adjust the number of engine threads to match the number of CPUs available to the engine. Note that the minimal value for maxThreads and maxSpareThreads is 2, which applies to running with 1 CPU.  However, it is recommended to

Working Environment

It is always good to think about your working environment. Here I am listing mine,  expecting your comments to add other necessary tools to this list. Anti Virus Avast  –> http://www.avast.com/free-antivirus-download Avira  –> http://www.avira.com/en/avira-free-antivirus AVG  –> http://www.freeavg.com/?lng=in-en&cmpid=free Kaspersky  –> http://www.kaspersky.com/ McAfee  –> http://www.mcafee.com/us/ Symantec  –> http://www.symantec.com/index.jsp Application Server JBoss  –>   http://www.jboss.org/jbossas/ Tomcat –>   http://tomcat.apache.org/ Weblogic –>   http://www.oracle.com/technetwork/middleware/weblogic Browser Firefox –>   http://www.mozilla.com/en-US/firefox Google Chrome  –> http://www.google.com/chrome/ IE  –>   http://windows.microsoft.com/en-US/internet-explorer/downloads/ie Communication_Network IPMessenger –>   http://ipmsg.org/index.html.en Putty –>   http://www.chiark.greenend.org.uk/~sgtatham/putty

How to simulate Browser back button

When someone asks how to simulate a back button, they really mean to ask how to create a link that points to the previously visited page. Most browsers tend to keep a list of which websites the user has visited and in what order they have done so. The DOM window object provides access to the browser's history through the history object. Moving backward and forward through the user's history is done using the   back(), forward(), and go() methods of the  history  object. To move backward through history, just do window.history.back() ; This will act exactly like the user clicked on the Back button in their browser toolbar. Find below a sample html code: <html> <head> <script type="text/javascript"> function goBack(){  window.history.back() } </script> </head> <body>    <input type="button" value="Back" onclick="goBack()" /> </body> </html>