Ingest URL index pipeline

The complete data mappings from specification, database and schema are shown for the URL category.

URL data specification

_id String UUID​​ ​SEOURL.SEOURL_ID
identifier String Relative SEO URL and unique identifier for this record shop/womens/bottomsunique identifier (no forward slash) SEOURLKEYWORD​.​URLKEYWORD​

status

​integer Current status of URL​ 0 - Inactive SEOURL1 - Active SEOURL2 - Expired SEOURL SEOURLKEYWORD.STATUS​
​​storeId ​integer ​Store id for this SEO URL
​languageId integer Language id for this URL ​-1
tokenName String Name to represent the type of the page StaticPagesToken, ProductToken, CategoryToken ​SEOURL.TOKENNAME
​tokenValue String​ ​Identifier for the page or object identifier that represents the page ​i.e. 10001 SEOURL.TOKENVALUE which can map to CATGROUP.CATGROUP_IDCATENTRY.CATENTRY_IDor a static page identifier​
​tokenExternalValue ​String ​Identifier for the external Object identifier for the object identified in tokenValue ​i.e. Bath i.e. BR-ACCE-0001​ ​The external identifier for the given TOKENVALUE and TOKENNAME. If TOKENNAME is CategoryToken, then this field maps to CATGROUP.IDENTIFIER and if TOKENNAME is ProductToken, then this fielm maps to CATENTRY.PARTNUMBER
redirectURL String URL to redirect if seoURL is inactive /shop/womens/modern/bottoms (url to redirect to if applicable with forward slash or fully qualified if going external)​ ​SEOURLKEYWORD.URLKEYWORD for SEOREDIRECT.SEOURLKEYWD_NEW of related record
page.name String Page Name CategoryPage, ProductPage, HomePage ​SEOPAGEDEF.PAGENAME
​page.type ​String Page Type to qualify the type of page Used with pageName to qualify the page. CategoryPage, ProductListingPage, ProductPage, ItemPage ,BundlePage, KitPage, DynamicKitPage ​Derived field
​​page.layoutName ​String ​Optional layout identifier to override the page ​For 9.1 - used to override a category or product display page ​Derived field
page.title String Page title metadata for SEO Womens Bottoms | Jjill ​SEOPAGEDEFDESC.TITLE
page.metaDescription String Page meta description for SEO ​SEOPAGEDEFDESC.META_DESC
page.metaKeyword String Page Meta keyword/tags for SEO ​SEOPAGEDEFDESC.META_KEYWORD
page.imageAlternateDescription String Page image alternative descriptions ​SEOPAGEDEFDESC.IMAGE_ALT_DESC

URL index field mapping from database

The following sequence of steps illustrates the URL indexing pipeline implemented in Apache NiFi. Extensive example samples are available for each stage. These are provided in the bottom sections of this topic. The examples include SQL code, schema table information, and sample inputs and outputs. The flow consists of mainly seven stages:
  1. Create Category URL ​​document​​​​​​​​​​​​​​​​​
  2. Create Product URL ​​document​​​​​​​​​​​​​​​​​
  3. Update Page Type for Category URL document
  4. Update Category URL for fallback language
  5. Update Product URL for fallback language
  6. Update SEO URL to Category document
  7. Update SEO URL to Product document

Stage 1: Create Category URL document

This stage describes how Category SEO URL data can be transformed and loaded into the URL index. It starts with running the following SQL to retrieve category data from the Commerce database:
 (SELECT A.SEOURL_ID, B.SEOURLKEYWORD_ID, B.URLKEYWORD, B.MOBILEURLKEYWORD, B.STOREENT_ID, B.STATUS,
		       B.LANGUAGE_ID, C.SEOURLKWD_ID_NEW, D.URLKEYWORD URLKEYWORD_NEW, A.TOKENNAME, A.TOKENVALUE, L.LOCALENAME,
		       P.DISPLAYNAME, P.DESCRIPTION, P.CATGROUP_ID, P.NAME, P.SHORTDESCRIPTION, P.KEYWORD,
		       P.SITE_SEOPAGEDEF_ID, P.SITE_PAGENAME, P.SITE_TITLE, P.SITE_META_DESC, P.SITE_META_KEYWORD,
		       P.SITE_IMAGE_ALT_DESC, P.SITE_OBJECT_ID, P.SITE_STOREENT_ID, P.IDENTIFIER,
	           P.OVERRIDE_SEOPAGEDEF_ID, P.OVERRIDE_PAGENAME, P.OVERRIDE_TITLE, P.OVERRIDE_META_DESC,
	           P.OVERRIDE_META_KEYWORD, P.OVERRIDE_IMAGE_ALT_DESC, P.OVERRIDE_OBJECT_ID, TO_CHAR(P.OVERRIDE_STOREENT_ID) OVERRIDE_STOREENT_ID
		  FROM SEOURL A, SEOURLKEYWORD B
			   LEFT OUTER JOIN SEOREDIRECT C ON B.SEOURLKEYWORD_ID=C.SEOURLKWD_ID_ORIG
			   LEFT OUTER JOIN SEOURLKEYWORD D ON C.SEOURLKWD_ID_NEW=D.SEOURLKEYWORD_ID
			   LEFT OUTER JOIN LANGUAGE L ON B.LANGUAGE_ID = L.LANGUAGE_ID
			   LEFT OUTER JOIN (
					SELECT COALESCE(S.DISPLAYNAME, SD.DISPLAYNAME) DISPLAYNAME,
					       COALESCE(S.DESCRIPTION, SD.DESCRIPTION) DESCRIPTION, 
					       CG.IDENTIFIER, CD.CATGROUP_ID, CD.NAME, CD.KEYWORD, CD.SHORTDESCRIPTION,
					       E.SEOPAGEDEF_ID SITE_SEOPAGEDEF_ID,
					       E.PAGENAME SITE_PAGENAME,
					       E.TITLE SITE_TITLE,
					       E.META_DESC SITE_META_DESC,
					       E.META_KEYWORD SITE_META_KEYWORD,
					       E.IMAGE_ALT_DESC SITE_IMAGE_ALT_DESC,
					       E.OBJECT_ID SITE_OBJECT_ID,
					       E.STOREENT_ID SITE_STOREENT_ID,
					       F.SEOPAGEDEF_ID OVERRIDE_SEOPAGEDEF_ID,
					       F.PAGENAME OVERRIDE_PAGENAME,
					       F.TITLE OVERRIDE_TITLE,
					       F.META_DESC OVERRIDE_META_DESC,
					       F.META_KEYWORD OVERRIDE_META_KEYWORD,
					       F.IMAGE_ALT_DESC OVERRIDE_IMAGE_ALT_DESC,
					       F.OBJECT_ID OVERRIDE_OBJECT_ID,
					       F.STOREENT_ID OVERRIDE_STOREENT_ID
					  FROM STOREENTDS S
					       INNER JOIN STORE ST ON S.STOREENT_ID=ST.STORE_ID
					       INNER JOIN CATGRPDESC CD ON S.LANGUAGE_ID=CD.LANGUAGE_ID ${extCatgroupAndSQL1b}
						   INNER JOIN CATGROUP CG ON CG.CATGROUP_ID=CD.CATGROUP_ID
						   ${TI_DELTA_CG_URL_JOIN_QUERY}
					       INNER JOIN STOREENTDS SD ON ST.STORE_ID=SD.STOREENT_ID
					       LEFT OUTER JOIN (
					       		SELECT SC.OBJECT_ID OBJECT_ID,
					       			   SA.SEOPAGEDEF_ID SEOPAGEDEF_ID,
					       			   SA.PAGENAME PAGENAME,
					       			   SB.TITLE TITLE,
					       			   SB.META_DESC META_DESC,
					       			   SB.META_KEYWORD META_KEYWORD,
					       			   SB.IMAGE_ALT_DESC IMAGE_ALT_DESC,
					       			   SA.STOREENT_ID STOREENT_ID
					              FROM SEOPAGEDEF SA, SEOPAGEDEFDESC SB, SEOPAGEDEFOVR SC
					 			 WHERE SA.SEOPAGEDEF_ID=SB.SEOPAGEDEF_ID AND SA.SEOPAGEDEF_ID=SC.SEOPAGEDEF_ID
					   			   AND SA.STOREENT_ID IN (SELECT RELATEDSTORE_ID FROM STOREREL
					   			   					      WHERE STORE_ID=${param.storeId} AND STRELTYP_ID=-4)
					   			   AND SB.LANGUAGE_ID=${param.langId}
					   			   AND SC.OBJECTTYPE = 'CatalogGroup') E ON E.OBJECT_ID = 0
					       LEFT OUTER JOIN (
					       		SELECT SC.OBJECT_ID OBJECT_ID,
					       			   SA.SEOPAGEDEF_ID SEOPAGEDEF_ID,
					       			   SA.PAGENAME PAGENAME,
					       			   SB.TITLE TITLE,
					       			   SB.META_DESC META_DESC,
					       			   SB.META_KEYWORD META_KEYWORD,
					       			   SB.IMAGE_ALT_DESC IMAGE_ALT_DESC,
					       			   SA.STOREENT_ID STOREENT_ID
					              FROM SEOPAGEDEF SA, SEOPAGEDEFDESC SB, SEOPAGEDEFOVR SC
					 			 WHERE SA.SEOPAGEDEF_ID=SB.SEOPAGEDEF_ID AND SA.SEOPAGEDEF_ID=SC.SEOPAGEDEF_ID
					   			   AND SA.STOREENT_ID IN (SELECT RELATEDSTORE_ID FROM STOREREL
					   			   					      WHERE STORE_ID=${param.storeId} AND STRELTYP_ID=-4)
					   			   AND SB.LANGUAGE_ID=${param.langId}
					   			   AND SC.OBJECTTYPE = 'CatalogGroup') F ON F.OBJECT_ID = CD.CATGROUP_ID
					 WHERE ST.STORE_ID=${param.storeId}
					   AND (( S.STOREENT_ID=ST.STORE_ID AND S.LANGUAGE_ID=${param.langId} )
					    OR  ( SD.LANGUAGE_ID=ST.LANGUAGE_ID ))
			   ) P ON P.CATGROUP_ID IN (
				 SELECT C.CATGROUP_ID
				   FROM CATGRPREL R, CATGROUP C
				  WHERE R.CATALOG_ID = ${param.catalogId}
				    AND R.CATALOG_ID IN (SELECT CATALOG_ID FROM STORECAT WHERE STOREENT_ID IN
				        (SELECT RELATEDSTORE_ID FROM STOREREL WHERE STATE = 1 AND STRELTYP_ID = -4 AND STORE_ID = ${param.storeId}))
				    AND R.CATGROUP_ID_CHILD = C.CATGROUP_ID AND C.MARKFORDELETE = 0
				  UNION
				 SELECT C.CATGROUP_ID
				   FROM CATTOGRP R, CATGROUP C
				  WHERE R.CATALOG_ID = ${param.catalogId}
				    AND R.CATALOG_ID IN (SELECT CATALOG_ID FROM STORECAT WHERE STOREENT_ID IN
				        (SELECT RELATEDSTORE_ID FROM STOREREL WHERE STATE = 1 AND STRELTYP_ID = -4 AND STORE_ID = ${param.storeId}))
				    AND R.CATGROUP_ID = C.CATGROUP_ID AND C.MARKFORDELETE = 0)
		 WHERE B.STOREENT_ID IN
		       (SELECT RELATEDSTORE_ID FROM STOREREL E WHERE E.STORE_ID=${param.storeId} AND E.STRELTYP_ID=-4)
		   AND A.SEOURL_ID=B.SEOURL_ID AND B.LANGUAGE_ID=${param.langId} AND A.TOKENNAME IN ('CategoryToken')
		   AND A.TOKENVALUE = P.CATGROUP_ID) ORDER BY SEOURL_ID 
                 OFFSET ${param.offset} ROWS FETCH NEXT ${param.pageSize} ROWS ONLY
Next, the result set is passed to the CreateCategorytURLDocumentFromDatabase​ processor for transformation, using the following table to ​map the database field returned from the SQL above to an index field in the URL index:​
​​​​​Index Field​ Name​​ ​Index Field Type and Options​​​​ ​​Description
Internal Me​​​ta Data​​​​​​
​_id ​internal id/store + id/url
_​_meta/version/min ​integer ​Minimal compatible version of the runtime to work with this document
​__meta/version/max ​integer ​Latest compatible version of the runtime that works with this document
​​__meta/created ​date Creation date and time of this document​
__meta/modified ​date Last modification date and time of this document​​
​​Document Identifier​​
​id/store id_string Internal id of the owning store
id/​language id_string The identifier of the current language​
id/​catalog id_string​ The identifier of the current sales catalog​
​id/​url id_string The internal UUID of this SEO URL​; mapped to SEOURL.SEOURL_ID
​​identifier/specification id_string Set to "​url"
identifier/​store id_string A string that uniquely identifies the owning store
identifier/​language id_string The language locale of this URL
​identifier/url id_string Relative SEO URL and unique identifier for this record - the external identifier for the given TOKENVALUE and TOKENNAME.Note: should not include forward slash in this SEO URL
Properties​​​
​token/name id_string Name to represent the type of the page:StaticPagesToken, ProductToken, CategoryTokenMapped to SEOURL.TOKENNAME
​token/id id_string ​Identifier for the page or object identifier that represents the page; mapped to SEOURL.TOKENVALUE
​token/identifier id_string Identifier for the external Object identifier for the object identified in tokenValue
status integer Current status of the URL: 0 - Inactive SEOURL1 - Active SEOURL2 - Expired SEOURL Mapped to SEOURLKEYWORD.STATUS​
redirect ​​raw A partial or fully qualified URL to redirect to if this URL is inactive; mapped to ​SEOURLKEYWORD.URLKEYWORD for SEOREDIRECT.SEOURLKEYWD_NEW of related record​
Page Meta​ Data​​​
page/​name raw The page name; mapped to SEOPAGEDEF.PAGENAME
page/type raw This field is used for qualifying the type of page and is used together with pageName to qualify the page:CategoryPage, ProductListPage, ProductPage, ItemPage ,BundlePage, KitPage, DynamicKitPage, VariantPage
page/layout raw Optional layout identifier to override the page
page/title raw Page title metadata for SEO; mapped to ​SEOPAGEDEFDESC.TITLE
page/​​meta/description raw Page meta description for SEO; mapped to SEOPAGEDEFDESC.META_DESC
page/meta/keyword ​raw Page Meta keyword/tags for SEO; mapped to ​SEOPAGEDEFDESC.META_KEYWORD
page/meta/image raw Page image alternative descriptions; mapped to SEOPAGEDEFDESC.IMAGE_ALT_DESC
template/​name raw SEO template for generating this Page name
template/title raw SEO template for generating this Page title metadata; mapped to SEOPAGEDEFDESC​.TITLE
template/​​meta/description raw SEO template for generating this Page meta description; mapped to SEOPAGEDEFDESC.META_DESC
template/meta/keyword ​raw SEO template for generating this Page Meta keyword/tags; mapped to SEOPAGEDEFDESC.META_KEYWORD​
template/meta/image raw SEO template for generating this Page image alternative descriptions; mapped to SEOPAGEDEFDESC.IMAGE_ALT_DESC
For example code, see stage 1 samples.

Stage 2: Create Product URL document

This stage describes how Product SEO URL data can be transformed and loaded into the URL index.

It starts with running the following SQL to retrieve product data from the Commerce database:
 (SELECT A.SEOURL_ID, B.SEOURLKEYWORD_ID, B.URLKEYWORD, B.MOBILEURLKEYWORD, B.STOREENT_ID, B.STATUS,
			B.LANGUAGE_ID, C.SEOURLKWD_ID_NEW, D.URLKEYWORD URLKEYWORD_NEW, A.TOKENNAME, A.TOKENVALUE, L.LOCALENAME,
			P.DISPLAYNAME, P.DESCRIPTION, P.CATENTRY_ID, P.NAME, P.SHORTDESCRIPTION,
			P.KEYWORD, P.PARTNUMBER, P.MFNAME, P.MFPARTNUMBER, P.CATENTTYPE_ID,
			P.SITE_SEOPAGEDEF_ID, P.SITE_PAGENAME, P.SITE_TITLE, P.SITE_META_DESC, P.SITE_META_KEYWORD,
			P.SITE_IMAGE_ALT_DESC, P.SITE_OBJECT_ID, P.SITE_STOREENT_ID,
			P.OVERRIDE_SEOPAGEDEF_ID, P.OVERRIDE_PAGENAME, P.OVERRIDE_TITLE, P.OVERRIDE_META_DESC,
			P.OVERRIDE_META_KEYWORD, P.OVERRIDE_IMAGE_ALT_DESC, P.OVERRIDE_OBJECT_ID, P.OVERRIDE_STOREENT_ID
	      FROM SEOURL A, SEOURLKEYWORD B
			LEFT OUTER JOIN SEOREDIRECT C ON B.SEOURLKEYWORD_ID=C.SEOURLKWD_ID_ORIG
			LEFT OUTER JOIN SEOURLKEYWORD D ON C.SEOURLKWD_ID_NEW=D.SEOURLKEYWORD_ID
			LEFT OUTER JOIN LANGUAGE L ON B.LANGUAGE_ID = L.LANGUAGE_ID
			LEFT OUTER JOIN (
				 SELECT COALESCE(S.DISPLAYNAME, SD.DISPLAYNAME) DISPLAYNAME,
						COALESCE(S.DESCRIPTION, SD.DESCRIPTION) DESCRIPTION,
						CE.CATENTRY_ID, CD.NAME, CD.SHORTDESCRIPTION, CE.CATENTTYPE_ID,
						CD.KEYWORD, CE.PARTNUMBER, CE.MFNAME, CE.MFPARTNUMBER,
						E.SEOPAGEDEF_ID SITE_SEOPAGEDEF_ID,
						E.PAGENAME SITE_PAGENAME,
						E.TITLE SITE_TITLE,
						E.META_DESC SITE_META_DESC,
						E.META_KEYWORD SITE_META_KEYWORD,
						E.IMAGE_ALT_DESC SITE_IMAGE_ALT_DESC,
						E.OBJECT_ID SITE_OBJECT_ID,
						E.STOREENT_ID SITE_STOREENT_ID,
						F.SEOPAGEDEF_ID OVERRIDE_SEOPAGEDEF_ID,
						F.PAGENAME OVERRIDE_PAGENAME,
						F.TITLE OVERRIDE_TITLE,
						F.META_DESC OVERRIDE_META_DESC,
						F.META_KEYWORD OVERRIDE_META_KEYWORD,
						F.IMAGE_ALT_DESC OVERRIDE_IMAGE_ALT_DESC,
						F.OBJECT_ID OVERRIDE_OBJECT_ID,
						F.STOREENT_ID OVERRIDE_STOREENT_ID
				   FROM STOREENTDS S
						INNER JOIN STORE ST ON S.STOREENT_ID=ST.STORE_ID
						INNER JOIN CATENTDESC CD ON S.LANGUAGE_ID=CD.LANGUAGE_ID ${extCatentryAndSQL1b}
						INNER JOIN CATENTRY CE ON CD.CATENTRY_ID=CE.CATENTRY_ID
						${TI_DELTA_JOIN_QUERY_ATTCH}
						INNER JOIN STOREENTDS SD ON ST.STORE_ID=SD.STOREENT_ID
						LEFT OUTER JOIN (
								SELECT SC.OBJECT_ID OBJECT_ID,
									   SA.SEOPAGEDEF_ID SEOPAGEDEF_ID,
									   SA.PAGENAME PAGENAME,
									   SB.TITLE TITLE,
									   SB.META_DESC META_DESC,
									   SB.META_KEYWORD META_KEYWORD,
									   SB.IMAGE_ALT_DESC IMAGE_ALT_DESC,
									   SA.STOREENT_ID STOREENT_ID
							   FROM SEOPAGEDEF SA, SEOPAGEDEFDESC SB, SEOPAGEDEFOVR SC
							   WHERE SA.SEOPAGEDEF_ID=SB.SEOPAGEDEF_ID AND SA.SEOPAGEDEF_ID=SC.SEOPAGEDEF_ID
								   AND SA.STOREENT_ID IN (SELECT RELATEDSTORE_ID FROM STOREREL
															 WHERE STORE_ID=${param.storeId} AND STRELTYP_ID=-4)
								   AND SB.LANGUAGE_ID=${param.langId}
								   AND SC.OBJECTTYPE = 'CatalogEntry') E ON E.OBJECT_ID = 0
						LEFT OUTER JOIN (
								SELECT SC.OBJECT_ID OBJECT_ID,
									   SA.SEOPAGEDEF_ID SEOPAGEDEF_ID,
									   SA.PAGENAME PAGENAME,
									   SB.TITLE TITLE,
									   SB.META_DESC META_DESC,
									   SB.META_KEYWORD META_KEYWORD,
									   SB.IMAGE_ALT_DESC IMAGE_ALT_DESC,
									   SA.STOREENT_ID STOREENT_ID
							   FROM SEOPAGEDEF SA, SEOPAGEDEFDESC SB, SEOPAGEDEFOVR SC
							   WHERE SA.SEOPAGEDEF_ID=SB.SEOPAGEDEF_ID AND SA.SEOPAGEDEF_ID=SC.SEOPAGEDEF_ID
								   AND SA.STOREENT_ID IN (SELECT RELATEDSTORE_ID FROM STOREREL
															 WHERE STORE_ID=${param.storeId} AND STRELTYP_ID=-4)
								   AND SB.LANGUAGE_ID=${param.langId}
								   AND SC.OBJECTTYPE = 'CatalogEntry') F ON F.OBJECT_ID = CE.CATENTRY_ID
				  WHERE ST.STORE_ID=${param.storeId}
					AND (( S.STOREENT_ID=ST.STORE_ID AND S.LANGUAGE_ID=${param.langId} )
					 OR  ( SD.LANGUAGE_ID=ST.LANGUAGE_ID ))
			) P ON P.CATENTRY_ID IN (
			  SELECT C.CATENTRY_ID
				FROM CATGPENREL R, CATENTRY C
			   WHERE R.CATALOG_ID = ${param.catalogId} AND R.CATALOG_ID IN (SELECT CATALOG_ID FROM STORECAT WHERE STOREENT_ID IN
					 (SELECT RELATEDSTORE_ID FROM STOREREL WHERE STATE = 1 AND STRELTYP_ID = -4 AND STORE_ID = ${param.storeId}))
				 AND R.CATENTRY_ID = C.CATENTRY_ID AND C.MARKFORDELETE = 0
				 AND C.CATENTTYPE_ID IN ('ProductBean', 'ItemBean', 'VariantBean'))
	     WHERE B.STOREENT_ID IN
			(SELECT RELATEDSTORE_ID FROM STOREREL E WHERE E.STORE_ID=${param.storeId} AND E.STRELTYP_ID=-4)
		AND A.SEOURL_ID=B.SEOURL_ID AND B.LANGUAGE_ID=${param.langId} AND A.TOKENNAME IN ('ProductToken')
		AND A.TOKENVALUE = P.CATENTRY_ID) ORDER BY SEOURL_ID
             OFFSET ${param.offset} ROWS FETCH NEXT ${param.pageSize} ROWS ONLY

Next, the result set is passed to the CreateProductURLDocumentFromDatabase​ processor for transformation, using the above same table to ​map the database field returned from the SQL above to an index field in the URL index. For example code, see stage 2 samples.

Stage 3: Update Page Type for Category URL document

This stage describes how the page type for Category URL document can be combined with the proper page type and stored back to the URL index.

It starts with running the following SQL to retrieve product data from the Commerce database:
SELECT B.SEOURLKEYWORD_ID		       
		  FROM SEOURL A, SEOURLKEYWORD B
		 WHERE B.STOREENT_ID IN
		       (SELECT RELATEDSTORE_ID FROM STOREREL E WHERE E.STORE_ID=${param.storeId} AND E.STRELTYP_ID=-4)
		   AND A.SEOURL_ID=B.SEOURL_ID AND B.LANGUAGE_ID=${param.langId} AND A.TOKENNAME IN ('CategoryToken')
		   AND A.TOKENVALUE IN (
				 SELECT P.CATGROUP_ID 
				   FROM CATGPENREL P,
						(SELECT G.CATGROUP_ID, R.CATALOG_ID
						   FROM CATGRPREL R, CATGROUP G
						  WHERE R.CATALOG_ID = ${param.catalogId}
						    AND R.CATALOG_ID IN (SELECT CATALOG_ID FROM STORECAT WHERE STOREENT_ID IN
									(SELECT RELATEDSTORE_ID FROM STOREREL WHERE STATE = 1 AND STRELTYP_ID = -4 AND STORE_ID = ${param.storeId}))
						    AND R.CATGROUP_ID_CHILD = G.CATGROUP_ID AND G.MARKFORDELETE = 0
						  UNION
						 SELECT G.CATGROUP_ID, R.CATALOG_ID
						   FROM CATTOGRP R, CATGROUP G
						  WHERE R.CATALOG_ID = ${param.catalogId}
						    AND R.CATALOG_ID IN (SELECT CATALOG_ID FROM STORECAT WHERE STOREENT_ID IN
									(SELECT RELATEDSTORE_ID FROM STOREREL WHERE STATE = 1 AND STRELTYP_ID = -4 AND STORE_ID = ${param.storeId}))
						    AND R.CATGROUP_ID = G.CATGROUP_ID AND G.MARKFORDELETE = 0) H
				 ${TI_DELTA_CG_URL_1C_JOIN_QUERY}
				 WHERE P.CATALOG_ID = H.CATALOG_ID AND P.CATGROUP_ID = H.CATGROUP_ID ${extCatgroupAndSQL1a}
			     UNION
                SELECT C.CATGROUP_ID
				  FROM CATGRPREL R, CATGROUP C
				 ${TI_DELTA_CG_JOIN_QUERY}
				 WHERE R.CATALOG_ID = ${param.catalogId} ${extCatgroupAndSQL}
				   AND R.CATALOG_ID IN (SELECT CATALOG_ID FROM STORECAT WHERE STOREENT_ID IN
						   (SELECT RELATEDSTORE_ID FROM STOREREL WHERE STATE = 1 AND STRELTYP_ID = -4 AND STORE_ID = ${param.storeId}))
				   AND R.CATGROUP_ID_CHILD = C.CATGROUP_ID AND C.MARKFORDELETE = 0 AND C.DYNAMIC = 1)
               ORDER BY B.SEOURLKEYWORD_ID
               OFFSET ${param.offset} ROWS FETCH NEXT ${param.pageSize} ROWS ONLY
Next, the result set is passed to the UpdatePageTypeFromDatabase​​ processor for transformation, using the following table to ​map the database field returned from the SQL above to an index field in the URL index:​​
​​Index Field​ Name​ ​Index Field Type ​​Description
page/type raw This field is used for qualifying the type of page and is used together with pageName to qualify the page:CategoryPage, ProductListPage, ProductPage, ItemPage ,BundlePage, KitPage, DynamicKitPage, VariantPage
For example code, see stage 3 samples.

Stage 4: Update Category URL for Fallback Language

This stage describes how Category SEO URL data for fallback langague can be transformed and loaded into the URL index.​ It starts with running the following Elasticsearch query against the URL index:
SELECT S.TOKENVALUE, SD.URLKEYWORD FROM SEOURL S, SEOURLKEYWORD SD 
			where S.SEOURL_ID IN(SELECT A.SEOURL_ID FROM SEOURL A
	           LEFT OUTER JOIN SEOURLKEYWORD B ON (A.SEOURL_ID=B.SEOURL_ID AND B.LANGUAGE_ID=${param.langId}
	                                                AND B.STOREENT_ID IN
	                                                    (SELECT RELATEDSTORE_ID FROM STOREREL E WHERE E.STORE_ID=${param.storeId} AND E.STRELTYP_ID=-4))
			   LEFT OUTER JOIN SEOREDIRECT C ON B.SEOURLKEYWORD_ID=C.SEOURLKWD_ID_ORIG
			   LEFT OUTER JOIN SEOURLKEYWORD D ON C.SEOURLKWD_ID_NEW=D.SEOURLKEYWORD_ID
			   LEFT OUTER JOIN LANGUAGE L ON B.LANGUAGE_ID = L.LANGUAGE_ID
			   LEFT OUTER JOIN (
					SELECT COALESCE(S.DISPLAYNAME, SD.DISPLAYNAME) DISPLAYNAME,
					       COALESCE(S.DESCRIPTION, SD.DESCRIPTION) DESCRIPTION, 
					       CG.IDENTIFIER, CD.CATGROUP_ID, CD.NAME, CD.KEYWORD, CD.SHORTDESCRIPTION,
					       E.SEOPAGEDEF_ID SITE_SEOPAGEDEF_ID,
					       E.PAGENAME SITE_PAGENAME,
					       E.TITLE SITE_TITLE,
					       E.META_DESC SITE_META_DESC,
					       E.META_KEYWORD SITE_META_KEYWORD,
					       E.IMAGE_ALT_DESC SITE_IMAGE_ALT_DESC,
					       E.OBJECT_ID SITE_OBJECT_ID,
					       E.STOREENT_ID SITE_STOREENT_ID,
					       F.SEOPAGEDEF_ID OVERRIDE_SEOPAGEDEF_ID,
					       F.PAGENAME OVERRIDE_PAGENAME,
					       F.TITLE OVERRIDE_TITLE,
					       F.META_DESC OVERRIDE_META_DESC,
					       F.META_KEYWORD OVERRIDE_META_KEYWORD,
					       F.IMAGE_ALT_DESC OVERRIDE_IMAGE_ALT_DESC,
					       F.OBJECT_ID OVERRIDE_OBJECT_ID,
					       F.STOREENT_ID OVERRIDE_STOREENT_ID
					  FROM STOREENTDS S
					       INNER JOIN STORE ST ON S.STOREENT_ID=ST.STORE_ID
					       INNER JOIN CATGRPDESC CD ON S.LANGUAGE_ID=CD.LANGUAGE_ID ${extCatgroupAndSQL1b}
						   INNER JOIN CATGROUP CG ON CG.CATGROUP_ID=CD.CATGROUP_ID
						   ${TI_DELTA_CG_URL_JOIN_QUERY}
					       INNER JOIN STOREENTDS SD ON ST.STORE_ID=SD.STOREENT_ID
					       LEFT OUTER JOIN (
					       		SELECT SC.OBJECT_ID OBJECT_ID,
					       			   SA.SEOPAGEDEF_ID SEOPAGEDEF_ID,
					       			   SA.PAGENAME PAGENAME,
					       			   SB.TITLE TITLE,
					       			   SB.META_DESC META_DESC,
					       			   SB.META_KEYWORD META_KEYWORD,
					       			   SB.IMAGE_ALT_DESC IMAGE_ALT_DESC,
					       			   SA.STOREENT_ID STOREENT_ID
					              FROM SEOPAGEDEF SA, SEOPAGEDEFDESC SB, SEOPAGEDEFOVR SC
					 			 WHERE SA.SEOPAGEDEF_ID=SB.SEOPAGEDEF_ID AND SA.SEOPAGEDEF_ID=SC.SEOPAGEDEF_ID
					   			   AND SA.STOREENT_ID IN (SELECT RELATEDSTORE_ID FROM STOREREL
					   			   					      WHERE STORE_ID=${param.storeId} AND STRELTYP_ID=-4)
					   			   AND SB.LANGUAGE_ID=${param.langId}
					   			   AND SC.OBJECTTYPE = 'CatalogGroup') E ON E.OBJECT_ID = 0
					       LEFT OUTER JOIN (
					       		SELECT SC.OBJECT_ID OBJECT_ID,
					       			   SA.SEOPAGEDEF_ID SEOPAGEDEF_ID,
					       			   SA.PAGENAME PAGENAME,
					       			   SB.TITLE TITLE,
					       			   SB.META_DESC META_DESC,
					       			   SB.META_KEYWORD META_KEYWORD,
					       			   SB.IMAGE_ALT_DESC IMAGE_ALT_DESC,
					       			   SA.STOREENT_ID STOREENT_ID
					              FROM SEOPAGEDEF SA, SEOPAGEDEFDESC SB, SEOPAGEDEFOVR SC
					 			 WHERE SA.SEOPAGEDEF_ID=SB.SEOPAGEDEF_ID AND SA.SEOPAGEDEF_ID=SC.SEOPAGEDEF_ID
					   			   AND SA.STOREENT_ID IN (SELECT RELATEDSTORE_ID FROM STOREREL
					   			   					      WHERE STORE_ID=${param.storeId} AND STRELTYP_ID=-4)
					   			   AND SB.LANGUAGE_ID=${param.langId}
					   			   AND SC.OBJECTTYPE = 'CatalogGroup') F ON F.OBJECT_ID = CD.CATGROUP_ID
					 WHERE ST.STORE_ID=${param.storeId}
					   AND (( S.STOREENT_ID=ST.STORE_ID AND S.LANGUAGE_ID=${param.langId} )
					    OR  ( SD.LANGUAGE_ID=ST.LANGUAGE_ID ))
			   ) P ON P.CATGROUP_ID IN (
				 SELECT C.CATGROUP_ID
				   FROM CATGRPREL R, CATGROUP C
				  WHERE R.CATALOG_ID = ${param.catalogId}
				    AND R.CATALOG_ID IN (SELECT CATALOG_ID FROM STORECAT WHERE STOREENT_ID IN
				        (SELECT RELATEDSTORE_ID FROM STOREREL WHERE STATE = 1 AND STRELTYP_ID = -4 AND STORE_ID = ${param.storeId}))
				    AND R.CATGROUP_ID_CHILD = C.CATGROUP_ID AND C.MARKFORDELETE = 0
				  UNION
				 SELECT C.CATGROUP_ID
				   FROM CATTOGRP R, CATGROUP C
				  WHERE R.CATALOG_ID = ${param.catalogId}
				    AND R.CATALOG_ID IN (SELECT CATALOG_ID FROM STORECAT WHERE STOREENT_ID IN
				        (SELECT RELATEDSTORE_ID FROM STOREREL WHERE STATE = 1 AND STRELTYP_ID = -4 AND STORE_ID = ${param.storeId}))
				    AND R.CATGROUP_ID = C.CATGROUP_ID AND C.MARKFORDELETE = 0)
		 WHERE A.TOKENNAME IN ('CategoryToken')
		   AND A.TOKENVALUE = P.CATGROUP_ID AND B.SEOURLKEYWORD_ID IS NULL) 
		   AND S.SEOURL_ID = SD.SEOURL_ID AND SD.LANGUAGE_ID = ${default.language} ORDER BY S.SEOURL_ID
	OFFSET ${param.offset} ROWS FETCH NEXT ${param.pageSize} ROWS ONLY​

Next, the result set is passed to the UpdateCategoryURLFallbackFromDatabase processor for transformation, using the table in stage 1 to ​map the database field returned from the SQL above to an index field in the URL index.

Stage5: Update Product URL for Fallback Language

This stage describes how Product SEO URL data for fallback langague can be transformed and loaded into the URL index.​ It starts with running the following Elasticsearch query against the URL index:
 SELECT S.TOKENVALUE, SD.URLKEYWORD FROM SEOURL S, SEOURLKEYWORD SD 
	where S.SEOURL_ID IN(SELECT A.SEOURL_ID FROM SEOURL A
            LEFT OUTER JOIN SEOURLKEYWORD B ON (A.SEOURL_ID=B.SEOURL_ID AND B.LANGUAGE_ID=${param.langId}
                                                    AND B.STOREENT_ID IN
                                                        (SELECT RELATEDSTORE_ID FROM STOREREL E WHERE E.STORE_ID=${param.storeId} AND E.STRELTYP_ID=-4))
			LEFT OUTER JOIN SEOREDIRECT C ON B.SEOURLKEYWORD_ID=C.SEOURLKWD_ID_ORIG
			LEFT OUTER JOIN SEOURLKEYWORD D ON C.SEOURLKWD_ID_NEW=D.SEOURLKEYWORD_ID
			LEFT OUTER JOIN LANGUAGE L ON B.LANGUAGE_ID = L.LANGUAGE_ID
			LEFT OUTER JOIN (
				 SELECT COALESCE(S.DISPLAYNAME, SD.DISPLAYNAME) DISPLAYNAME,
						COALESCE(S.DESCRIPTION, SD.DESCRIPTION) DESCRIPTION,
						CE.CATENTRY_ID, CD.NAME, CD.SHORTDESCRIPTION, CE.CATENTTYPE_ID,
						CD.KEYWORD, CE.PARTNUMBER, CE.MFNAME, CE.MFPARTNUMBER,
						E.SEOPAGEDEF_ID SITE_SEOPAGEDEF_ID,
						E.PAGENAME SITE_PAGENAME,
						E.TITLE SITE_TITLE,
						E.META_DESC SITE_META_DESC,
						E.META_KEYWORD SITE_META_KEYWORD,
						E.IMAGE_ALT_DESC SITE_IMAGE_ALT_DESC,
						E.OBJECT_ID SITE_OBJECT_ID,
						E.STOREENT_ID SITE_STOREENT_ID,
						F.SEOPAGEDEF_ID OVERRIDE_SEOPAGEDEF_ID,
						F.PAGENAME OVERRIDE_PAGENAME,
						F.TITLE OVERRIDE_TITLE,
						F.META_DESC OVERRIDE_META_DESC,
						F.META_KEYWORD OVERRIDE_META_KEYWORD,
						F.IMAGE_ALT_DESC OVERRIDE_IMAGE_ALT_DESC,
						F.OBJECT_ID OVERRIDE_OBJECT_ID,
						F.STOREENT_ID OVERRIDE_STOREENT_ID
				   FROM STOREENTDS S
						INNER JOIN STORE ST ON S.STOREENT_ID=ST.STORE_ID
						INNER JOIN CATENTDESC CD ON S.LANGUAGE_ID=CD.LANGUAGE_ID ${extCatentryAndSQL1b}
						INNER JOIN CATENTRY CE ON CD.CATENTRY_ID=CE.CATENTRY_ID
						${TI_DELTA_JOIN_QUERY_ATTCH}
						INNER JOIN STOREENTDS SD ON ST.STORE_ID=SD.STOREENT_ID
						LEFT OUTER JOIN (
								SELECT SC.OBJECT_ID OBJECT_ID,
									   SA.SEOPAGEDEF_ID SEOPAGEDEF_ID,
									   SA.PAGENAME PAGENAME,
									   SB.TITLE TITLE,
									   SB.META_DESC META_DESC,
									   SB.META_KEYWORD META_KEYWORD,
									   SB.IMAGE_ALT_DESC IMAGE_ALT_DESC,
									   SA.STOREENT_ID STOREENT_ID
							   FROM SEOPAGEDEF SA, SEOPAGEDEFDESC SB, SEOPAGEDEFOVR SC
							   WHERE SA.SEOPAGEDEF_ID=SB.SEOPAGEDEF_ID AND SA.SEOPAGEDEF_ID=SC.SEOPAGEDEF_ID
								   AND SA.STOREENT_ID IN (SELECT RELATEDSTORE_ID FROM STOREREL
															 WHERE STORE_ID=${param.storeId} AND STRELTYP_ID=-4)
								   AND SB.LANGUAGE_ID=${param.langId}
								   AND SC.OBJECTTYPE = 'CatalogEntry') E ON E.OBJECT_ID = 0
						LEFT OUTER JOIN (
								SELECT SC.OBJECT_ID OBJECT_ID,
									   SA.SEOPAGEDEF_ID SEOPAGEDEF_ID,
									   SA.PAGENAME PAGENAME,
									   SB.TITLE TITLE,
									   SB.META_DESC META_DESC,
									   SB.META_KEYWORD META_KEYWORD,
									   SB.IMAGE_ALT_DESC IMAGE_ALT_DESC,
									   SA.STOREENT_ID STOREENT_ID
							   FROM SEOPAGEDEF SA, SEOPAGEDEFDESC SB, SEOPAGEDEFOVR SC
							   WHERE SA.SEOPAGEDEF_ID=SB.SEOPAGEDEF_ID AND SA.SEOPAGEDEF_ID=SC.SEOPAGEDEF_ID
								   AND SA.STOREENT_ID IN (SELECT RELATEDSTORE_ID FROM STOREREL
															 WHERE STORE_ID=${param.storeId} AND STRELTYP_ID=-4)
								   AND SB.LANGUAGE_ID=${param.langId}
								   AND SC.OBJECTTYPE = 'CatalogEntry') F ON F.OBJECT_ID = CE.CATENTRY_ID
				  WHERE ST.STORE_ID=${param.storeId}
					AND (( S.STOREENT_ID=ST.STORE_ID AND S.LANGUAGE_ID=${param.langId} )
					 OR  ( SD.LANGUAGE_ID=ST.LANGUAGE_ID ))
			) P ON P.CATENTRY_ID IN (
			  SELECT C.CATENTRY_ID
				FROM CATGPENREL R, CATENTRY C
			   WHERE R.CATALOG_ID = ${param.catalogId} AND R.CATALOG_ID IN (SELECT CATALOG_ID FROM STORECAT WHERE STOREENT_ID IN
					 (SELECT RELATEDSTORE_ID FROM STOREREL WHERE STATE = 1 AND STRELTYP_ID = -4 AND STORE_ID = ${param.storeId}))
				 AND R.CATENTRY_ID = C.CATENTRY_ID AND C.MARKFORDELETE = 0
				 AND C.CATENTTYPE_ID IN ('ProductBean', 'ItemBean', 'VariantBean'))
	  WHERE A.TOKENNAME IN ('ProductToken')
		AND A.TOKENVALUE = P.CATENTRY_ID AND B.SEOURLKEYWORD_ID IS NULL) 
		AND S.SEOURL_ID = SD.SEOURL_ID AND SD.LANGUAGE_ID = ${default.language} ORDER BY S.SEOURL_ID 
		OFFSET ${param.offset} ROWS FETCH NEXT ${param.pageSize} ROWS ONLY

​​Next, the result set is passed to the UpdateProductURLFallbackFromDatabase processor for transformation, using the table in stage 1 to ​map the database field returned from the SQL above to an index field in the URL index.​

Stage 6: Update SEO URL to Category document

This stage describes how the SEO URL data can be retrieved from the URL index and then load back into the Category index. It starts with running the following Elasticsearch query against the URL index:
        {
	    "stored_fields": [
	        "identifier.url",
	        "token.id"
	    ],
	    "size": 10000,
	    "_source": false,
	    "query": {
	        "bool": {
	            "must_not": [
	                {
	                    "exists": {
	                        "field": "redirect"
	                    }
	                }
	            ],
	            "must": [
			{
			"terms": {
			    "token.name": [ "CategoryToken" ]
			}
	​		},
	                {
	                    "term": {
	                        "id.language": ${param.langId}
	                    }
	                },
	                {
	                    "term": {
	                        "id.store": ${param.storeId}
	                    }
	                }
	            ]
	        }
	    }
	}
Next, the result set is passed to the UpdateCategoryURL​ processor for transformation, using the following table to ​map the database field returned from the SQL above to an index field in the Product index:​​
​​Index Field​ Name​ ​Index Field Type ​​Description
url/​​seo ​raw ​The SEO URL of this category entry; assigned from identifier.url field from the above search query​
For example code, see stage 6 samples.

Stage 7: Update SEO URL to Product document

This stage describes how the SEO URL data can be retrieved from the URL index and then load back into the Product index. It starts with running the following Elasticsearch query against the URL index:​
       ​{
	    "stored_fields": [
	        "identifier.url",
	        "token.id"
	    ],
	    "size": 10000,
	    "_source": false,
	    "query": {
	        "bool": {
	            "must_not": [
	                {
	                    "exists": {
	                        "field": "redirect"
	                    }
	                }
	            ],
	            "must": [
			{
			    "terms": {
				"token.name": [ "ProductToken"​ ]
			    }
			},
	                {
	                    "term": {
	                        "id.language": ${param.langId}
	                    }
	                },
	                {
	                    "term": {
	                        "id.store": ${param.storeId}
	                    }
	                }
	            ]
	        }
	    }
	}
Next, the result set is passed to the UpdateProductURL​ processor for transformation, using the following table to ​map the database field returned from the SQL above to an index field in the Product index:​​
​​Index Field​ Name​ ​Index Field Type ​​Description
url/​​seo ​raw ​The SEO URL of this catalog entry; assigned from identifier.url field from the above search query​
For example code, see stage 7 samples.

Stage 1 samples

The following code is an example of the input data for the CreateCategoryURLDocumentFromDatabase processor:


{
  "SEOURL_ID" : 12050,
  "SEOURLKEYWORD_ID" : 12050,
  "URLKEYWORD" : "newsletters",
  "MOBILEURLKEYWORD" : null,
  "STOREENT_ID" : 10501,
  "STATUS" : 1,
  "LANGUAGE_ID" : -1,
  "SEOURLKWD_ID_NEW" : null,
  "URLKEYWORD_NEW" : null,
  "TOKENNAME" : "CategoryToken",
  "TOKENVALUE" : "10040",
  "LOCALENAME" : "en_US           ",
  "DISPLAYNAME" : "AuroraESite",
  "DESCRIPTION" : "Commerce Model Store entity",
  "CATGROUP_ID" : 10040,
  "NAME" : "Newsletters",
  "SHORTDESCRIPTION" : "Newsletters",
  "KEYWORD" : "Newsletters",
  "SITE_SEOPAGEDEF_ID" : 10001,
  "SITE_PAGENAME" : "CATEGORY_PAGE",
  "SITE_TITLE" : "<seo: CategoryName/> | <seo: StoreName/>",
  "SITE_META_DESC" : "<seo: CategoryShortDescription/>",
  "SITE_META_KEYWORD" : "<seo: CategoryKeyword/>",
  "SITE_IMAGE_ALT_DESC" : "Image for <seo: CategoryName/> from <seo: StoreName/>",
  "SITE_OBJECT_ID" : "0",
  "SITE_STOREENT_ID" : 10501,
  "IDENTIFIER" : "Newsletters",
  "OVERRIDE_SEOPAGEDEF_ID" : null,
  "OVERRIDE_PAGENAME" : null,
  "OVERRIDE_TITLE" : null,
  "OVERRIDE_META_DESC" : null,
  "OVERRIDE_META_KEYWORD" : null,
  "OVERRIDE_IMAGE_ALT_DESC" : null,
  "OVERRIDE_OBJECT_ID" : null,
  "OVERRIDE_STOREENT_ID" : null
}

The CreateCategoryURLDocumentFromDatabase processor transforms the input data with the store id passed from NiFi FlowFile class as attribute into the following sample output data:


{ "update": { "_id": "1-12050", "_index": ".auth.1.url.202006160325", "retry_on_conflict": 5, "_source": false } }
{
  "doc": {
    "template": {
      "name": "CATEGORY_PAGE",
      "title": "<seo: CategoryName/> | <seo: StoreName/>",
      "meta": {
        "image": "Image for <seo: CategoryName/> from <seo: StoreName/>",
        "description": "<seo: CategoryShortDescription/>",
        "keyword": "<seo: CategoryKeyword/>"
      }
    },
    "identifier": {
      "specification": "url",
      "language": "en_US",
      "url": "newsletters"
    },
    "id": {
      "catalog": null,
      "language": "-1",
      "store": "1",
      "url": "12050"
    },
    "page": {
      "meta": {
        "image": "Image for Newsletters from AuroraESite",
        "description": "Newsletters",
        "keyword": "Newsletters"
      },
      "name": "CATEGORY_PAGE",
      "title": "Newsletters | AuroraESite",
      "type": "CategoryPage"
    },
    "__meta": {
      "created": "2020-08-04T19:36:35.884Z",
      "modified": "2020-08-04T19:36:35.910Z",
      "version": {
        "min": 0,
        "max": 0
      }
    },
    "status": 1,
    "token": {
      "identifier": "Newsletters",
      "name": "CategoryToken",
      "id": "10040"
    }
  },
  "doc_as_upsert": true
}

Stage 2 samples

The following code is an example of the input data for the CreateProductURLDocumentFromDatabase processor:


{
  "SEOURL_ID" : 12711,
  "SEOURLKEYWORD_ID" : 19712,
  "URLKEYWORD" : "versatil-empire-waist-sundress-aurorawmdrs-022",
  "MOBILEURLKEYWORD" : null,
  "STOREENT_ID" : 10501,
  "STATUS" : 1,
  "LANGUAGE_ID" : -1,
  "SEOURLKWD_ID_NEW" : null,
  "URLKEYWORD_NEW" : null,
  "TOKENNAME" : "ProductToken",
  "TOKENVALUE" : "10061",
  "LOCALENAME" : "en_US           ",
  "DISPLAYNAME" : "AuroraESite",
  "DESCRIPTION" : "Commerce Model Store entity",
  "CATENTRY_ID" : 10061,
  "NAME" : "Versatil Empire Waist Sundress                                                                                                  ",
  "SHORTDESCRIPTION" : "Empire waist sundress with flower print and frilly sleeves",
  "KEYWORD" : null,
  "PARTNUMBER" : "AuroraWMDRS-022",
  "MFNAME" : "Versatil",
  "MFPARTNUMBER" : null,
  "CATENTTYPE_ID" : "ItemBean        ",
  "SITE_SEOPAGEDEF_ID" : 10002,
  "SITE_PAGENAME" : "PRODUCT_PAGE",
  "SITE_TITLE" : "<seo: ProductName/> | <seo: StoreName/>",
  "SITE_META_DESC" : "<seo: ProductShortDescription/>",
  "SITE_META_KEYWORD" : "<seo: ProductKeyword/> <seo: ProductManufacturerName/>",
  "SITE_IMAGE_ALT_DESC" : "Image for <seo: ProductName/> from <seo: StoreName/>",
  "SITE_OBJECT_ID" : "0",
  "SITE_STOREENT_ID" : 10501,
  "OVERRIDE_SEOPAGEDEF_ID" : null,
  "OVERRIDE_PAGENAME" : null,
  "OVERRIDE_TITLE" : null,
  "OVERRIDE_META_DESC" : null,
  "OVERRIDE_META_KEYWORD" : null,
  "OVERRIDE_IMAGE_ALT_DESC" : null,
  "OVERRIDE_OBJECT_ID" : null,
  "OVERRIDE_STOREENT_ID" : null
}

The CreateProductURLDocumentFromDatabase processor transforms the input data with the store id passed from NiFi FlowFile class as attribute into the following sample output data:


{ "update": { "_id": "1-19712", "_index": ".auth.1.url.202006160325", "retry_on_conflict": 5, "_source": false } }
{
  "doc": {
    "template": {
      "name": "PRODUCT_PAGE",
      "type": "ItemPage",
      "title": "<seo: ProductName/> | <seo: StoreName/>",
      "meta": {
        "image": "Image for <seo: ProductName/> from <seo: StoreName/>",
        "description": "<seo: ProductShortDescription/>",
        "keyword": "<seo: ProductKeyword/> <seo: ProductManufacturerName/>"
      }
    },
    "identifier": {
      "specification": "url",
      "language": "en_US",
      "url": "versatil-empire-waist-sundress-aurorawmdrs-022"
    },
    "id": {
      "catalog": null,
      "language": "-1",
      "store": "1",
      "url": "19712"
    },
    "page": {
      "meta": {
        "image": "Image for Versatil Empire Waist Sundress from AuroraESite",
        "description": "Empire waist sundress with flower print and frilly sleeves",
        "keyword": " Versatil"
      },
      "name": "PRODUCT_PAGE",
      "type": "ItemPage",
      "title": "Versatil Empire Waist Sundress | AuroraESite"
    },
    "__meta": {
      "created": "2020-08-05T17:32:17.360Z",
      "modified": "2020-08-05T17:32:17.379Z",
      "version": {
        "min": 0,
        "max": 0
      }
    },
    "status": 1,
    "token": {
      "identifier": "AuroraWMDRS-022",
      "name": "ProductToken",
      "id": "10061"
    }
  },
  "doc_as_upsert": true

Stage 3 samples

The following code is an example of the input data for the UpdatePageTypeFromDatabase processor:


{
    "SEOURLKEYWORD_ID": 12027
}

The UpdatePageTypeFromDatabase processor transforms the input data with the store id passed from NiFi FlowFile class as attribute into the following sample output data:


{ "update": { "_id": "1-12027", "_index": ".auth.1.category.202006160325", "retry_on_conflict": 5, "_source": false } }
{
  "doc": {
    "page": {
      "type": "ProductListPage"
    },
    "__meta": {
      "created": "2020-08-05T18:10:22.115Z",
      "modified": "2020-08-05T18:10:22.133Z",
      "version": {
        "min": 0,
        "max": 0
      }
    }
  },
  "doc_as_upsert": true
}

Stage 6 samples

Stage 4

The following code is an example of the input data for the UpdateCategoryURL processor:


{
  "_index" : ".auth.1.url.202007052103",
  "_type" : "_doc",
  "_id" : "1-12045",
  "_score" : 1.0004607,
  "fields" : {
    "token.id" : [ "10036" ],
    "identifier.url" : [ "lighting-home" ]
  }
}

The UpdateCategoryURL processor transforms the input data with store id passed from NiFi FlowFile class as attribute into the following sample output data:


{ "update": { "_id": "1-null-null-10036", "_index": ".auth.1.category.202006160325", "retry_on_conflict": 5, "_source": false } }
{
  "doc": {
    "url": {
      "seo": "/lighting-home"
    },
    "__meta": {
      "created": "2020-08-05T18:43:04.969Z",
      "modified": "2020-08-05T18:43:04.984Z",
      "version": {
        "min": 0,
        "max": 0
      }
    }
  }
}

Stage 7 samples

The following code is an example of the input data for the UpdateProductURL processor:


{
  "_index" : ".auth.1.url.202007052126",
  "_type" : "_doc",
  "_id" : "1-19848",
  "_score" : 1.0004607,
  "fields" : {
    "token.id" : [ "10197" ],
    "identifier.url" : [ "versatil-strapless-sundress-aurorawmdrs-158" ]
  }
}

The UpdateProductURL processor transforms the input data with store id, language id, and catalog id passed from NiFi FlowFile class as attributes into the following output data:


{ "update": { "_id": "1--1-10001-10197", "_index": ".auth.1.product.202006160325", "retry_on_conflict": 5, "_source": false } }
{
  "doc": {
    "url": {
      "seo": "/versatil-strapless-sundress-aurorawmdrs-158"
    },
    "__meta": {
      "created": "2020-08-05T19:07:48.668Z",
      "modified": "2020-08-05T19:07:48.683Z",
      "version": {
        "min": 0,
        "max": 0
      }
    }
  }
}