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

ATG : Oracle started new discussion forum for ATG

Oracle has started a new ATG discussion forum on oracle discussion forums.  It has a main ATG section and is divided into technical and business categories. You can access the url   http://forums.oracle.com/forums/category.jspa?categoryID=503 .  After Oracle acquired ATG, this was much expected and we can hope this forum might give us a better chance to discuss our ATG doubts and more people will come and discuss about ATG. Find the ATG docs @   http://www.oracle.com/technetwork/indexes/documentation/atgwebcommerce-393465.html

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 Product Catalog schema ER diagram

Check out the O rder schema ER-Diagram @   http://tips4ufromsony.blogspot.in/2012/02/atg-order-schema-er-diagram.html Check out the User Profile  schema ER-Diagram @ http://tips4ufromsony.blogspot.in/2012/03/atg-user-profile-schema-er-diagram.html If you would like to know the relationship between different Product Catalog tables, please find below screen shots of  Product Catalog schema ER Diagrams.

Useful windows shortcut keys

Following are the most useful set of windows shortcut keys that I would like to share with you. run commands calc        -->  Calculator  mspaint   -->  To get Paint textpad   -->  To get Textpad if installed cmd        -->  Opens a new Command Window (cmd.exe)  control    -->  Displays Control Panel  msconfig   -->  Configuration to edit startup files  compmgmt.msc  -->  Computer management  fsmgmt.msc      -->  Folder Sharing Management  services.msc     -->   System Services  appwiz.cpl  --> Add/Remove Programs  ncpa.cpl     -->  Network Connections  %userprofile%  -->  Opens you User's Profile  %temp%  -->  Opens temporary file Folder  temp ...

Jsp and CSS size limits that web developers need to aware

Here I am listing some erroneous cases that might occur in your web development phase, due to some size restrictions. JSP file size limit : You might get some run time exceptions that the JSP file size limit exceeds. Please find below the reason : In JVM the size of a single JAVA method is limited to 64kb. When the jsp file is converted to Servlet, if the jspservice method's size exceeds the 64kb limit, this exception will occur. Keep in mind that this exception depends on the implementation of the JSP translator, means the same JSP code may give an exception in Tomcat and may run successfully in Weblogic due to the the difference in the logic to built the Servlet methods from JSP. The best way to omit this issue is by using dynamic include.For example, if you are using                  <%@ include file="sample.jsp" %> (static include),  replace this to               ...