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 Indexing - behind the scene steps explained

Read more about the search indexing @  http://tips4ufromsony.blogspot.com/2011/11/atg-search-architectural-flow-search.html ATG search indexing involves index file creation, deploying and copying the index file to the search engine's box. The steps can be divided into Initial stage, Preparing Content, Indexing and Deploying. Please find below the detailed analysis of each step. 1. Initial stage:        a. Check whether the folder deployshare configured correctly @ LaunchingService.deployShare  ( \atg\search\routing\LaunchingService.deployShare ). Lets assume that it is configured to \Search2007.1\SearchEngine\i686-win32-vc71\buildedIndexFiles.        b. Lets assume that the index file folder ( \Search2007.1\SearchEngine\i686-win32-vc71\indexFiles)  has the following segments (folders) currently :                     66900009 @ index engine box        66900010 @ search engine box        c. Lets assume that the component SearchEngineService has the "

ATG CA - BCC home screen : how to add a new link

          Activity source is the property which controls the links on the left nav on the BCC home screen. All activity sources are registered with the ActivityManager component at /atg/bizui/activity/ActivityManager . When rendering the BCC home page, the ActivityManager cycles through all the registered ActivitySource components and displays left navigation links for each of them on the BCC home page. For example if I want to add a new link "My New Link" , below screen shots exaplins how this can be done 1. Add  activityManager.properties to specify the activityresources. In this  activityManager, I specified one MyActivitySource. 2. Add  MyActivitySource.properties  to specify the name of the link and the other details . Here it refers to a bundle properties file.  3. Add  the bundle properties file  to specify the name of the link.  4. Now you could see the new link @ BCC home page . Each activity source has the following important functions:

Search Facets - how to create a new search facets in ATG Search

A Facet is a search refinement element that corresponds to a property of a commerce item type. ATG supports the search result refinement using the Faceted Search concept. Read more about facted search @  http://en.wikipedia.org/wiki/Faceted_search . Facet can either be ranges or specific values. Each facet is stored in the RefinementRepository as a separate refineElement repository item. Facets are divided into Global and Local facets. Global facets apply to all the categories and local facets only to the category in which they are created. For example Price/Brand can be considered as the facets that are common for all skus and New Release/Coming Soon can be considered as the facets that are specific to Physical Media products like Vidoe/DVD/Blue-ray/Books. We can use the ATG BCC - Merchandising UI to create facets. The Faceting Property depends on the meta-properties defined in the \atg\commerce\search\product-catalog-output-config.xml ( the definitionFile of the \atg\commerce\s