Once attachments are created in CMC and assigned to respective products, schedule job ScheduledContentManagedFileEARUpdate picks them up and moves them into Stores\\attachments folder. By default this job could be configured to run for 30 minutes so on dev, you will need to configure to run quicker to test.
Out of the box attachments are not picked and hence you pick up the static file below StaticContentSitemap.jsp and add the block below to read all attachments to be crawled
-----------------------------------------------------------------------------------------------------------
<wcbase:useBean id="attachmentBean" classname="com.ibm.commerce.catalog.beans.AttachmentDataBean" scope="page">
<c:set value="${langId}" target="${attachmentBean}" property="languageId"/>
</wcbase:useBean>
<c:forEach var="attachmentAssetDataBean" items="${attachmentBean.attachmentAssets}">
<c:set var="tempURL" value="/${attachmentAssetDataBean.directory}/${attachmentAssetDataBean.attachmentAssetPath}"/>
<c:set var="attachmentURL" value="${fn:replace(tempURL, ' ', '%20')}"/>
<url crawlurl="${attachmentURL}" indexurl="${attachmentURL}">
</c:forEach>
Out of the box attachments are not picked and hence you pick up the static file below StaticContentSitemap.jsp and add the block below to read all attachments to be crawled
-----------------------------------------------------------------------------------------------------------
<wcbase:useBean id="attachmentBean" classname="com.ibm.commerce.catalog.beans.AttachmentDataBean" scope="page">
<c:set value="${langId}" target="${attachmentBean}" property="languageId"/>
</wcbase:useBean>
<c:forEach var="attachmentAssetDataBean" items="${attachmentBean.attachmentAssets}">
<c:set var="tempURL" value="/${attachmentAssetDataBean.directory}/${attachmentAssetDataBean.attachmentAssetPath}"/>
<c:set var="attachmentURL" value="${fn:replace(tempURL, ' ', '%20')}"/>
<url crawlurl="${attachmentURL}" indexurl="${attachmentURL}">
</c:forEach>
-----------------------------------------------------------------------------------------------------------
You can run the build index and Crawler by running this command: from \bin
di-buildindex.bat -masterCatalogId 10001 -webcontentDelete true
crawler.bat -cfg C:\WCDE_ENT70\search\solr\home\droidConfig.xml
Configure the crawler file for the store : droidConfig.xml
-----------------------------------------------------------------------------------------------------------
<variables>
<var name="hostname">localhost</var>
<var name="storePathDirecttory">/WCDE_ENT70/wasprofile/temp/localhost/server1/WC/EliteStorefrontAssetStore</var>
<var name="langId">-1</var>
<var name="storeId">10151</var>
<var name="catalogId">10001</var>
<var name="language">en</var>
<var name="localename">en_US</var>
<var name="filterDir">/WCDE_ENT70/search/solr/home</var>
<var name="port">80</var>
</variables>
-----------------------------------------------------------------------------------------------------------
Me encanta el articulo, es super interesante y curioso, se lee genial con mucha fluidez. Estoy deseando leer más artículos vuestros, sois geniales.
ReplyDeleteQue buen blog tenéis, me encanta leer todos vuestros artículos es de los mejores blog. Además son super útiles y claros.
ReplyDeleteEs un blog muy interesante, me ha gustado mucho leerlo, ya que puede ser algo de gran utilidad para poner en práctica.
ReplyDeleteEnhorabuena por el artículo, muy buena redacción, se nota claramente que le pones esfuerzo y ganas.
ReplyDelete