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

Google Chrome shortcut keys

If you are a Google Chromey guy, please find below the list of shortcut keys for some of the most used features  :-) Find more shortcut keys @  http://www.google.com/support/chrome/bin/static.py?page=guide.cs&guide=25799&topic=28650

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

ATG - how to create and deploy a new atg module

ATG products are packaged as a number of separate application modules. Application modules exist in the ATG installation as a set of directories defined by a manifest file. To create a new module, follow the below steps : Create a module directory within your ATG installation.  Create a META-INF directory within the module directory. Note that this directory must be named META-INF.  Create a manifest file named MANIFEST.MF and include it in the META-INF directory for the module. The manifest contains the meta-data describing the module. A module located at <ATG2007.1dir>/MyModule is named MyModule and a module located at <ATG2007.1dir>/CustomModules/MyModule is named CustomModules.MyModule. Within the subdirectory that holds the module, any number of files may reside in any desired order. These files are the module resources (EAR files for J2EE applications, WAR files for web applications, EJB-JAR files for Enterprise JavaBeans, JAR files of Java classes, platform-d

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.

Good features of Eclipse 3.6 (Eclipse Helios) JDT

Read the Eclipse Galileo features @  http://tips4ufromsony.blogspot.com/2011/10/good-features-of-eclipse35-eclipse.html New options in Open Resource dialog : The Open Resource dialog supports three new features: • Path patterns: If the pattern contains a /, the part before the last / is used to match a path in the workspace: • Relative paths: For example, "./T" matches all files starting with T in the folder of the active editor or selection: • Closer items on top: If the pattern matches many files with the same name, the files that are closer to the currently edited or selected resource are shown on top of the matching items list. MarketPlace :  Searching and adding new plugins for Eclipse have always been a challenge. The Eclipse Marketplace makes this much easier – it allows you to not only search a central location of all Eclipse plugins, but also allows you to find the most recent and the most popular plugins. Fix multiple proble