Cognito Search
Go to App

Articles

Articles feed

Articles are editorial content — blog posts, guides, help-center pages. They are searched alongside products so visitors find advice as well as items to buy. Register the feed as a source of type Articles.

Structure

  • Root element: <articles>
  • Item element: <article> (zero or more)
<?xml version="1.0" encoding="UTF-8"?>
<articles>
<article>
<identify>8e884b60-e4b4-4c23-8bef-6bfa38dd5b60</identify>
<name>How to treat a fever at home</name>
<url>https://shop.example.com/blog/treat-a-fever</url>
<category primary="true">Pain &amp; fever | OTC medicines</category>
<category>Health advice</category>
<annotation><![CDATA[<p>A short <strong>guide</strong> to managing a fever.</p>]]></annotation>
<image_link_s>https://shop.example.com/img/fever-s.jpg</image_link_s>
<image_link_m>https://shop.example.com/img/fever-m.jpg</image_link_m>
<image_link_l>https://shop.example.com/img/fever-l.jpg</image_link_l>
</article>
</articles>

DTD

<!ELEMENT articles (article*)>
<!ELEMENT article (identify, name, url, category*, annotation?, image_link_s?, image_link_m?, image_link_l?)>
<!ELEMENT identify (#PCDATA)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT url (#PCDATA)>
<!ELEMENT category (#PCDATA)>
<!ATTLIST category primary (true|false) "false">
<!ELEMENT annotation (#PCDATA)>
<!ELEMENT image_link_s (#PCDATA)>
<!ELEMENT image_link_m (#PCDATA)>
<!ELEMENT image_link_l (#PCDATA)>

Children must appear in the order shown above.

Elements

ElementRequiredTypeSearchedMeaning
identifyyestextnoUnique identifier for the article (a UUID or any stable string). Used as the article's key.
nameyestextyesArticle title. Full-text and prefix (as-you-type) searchable.
urlyestextnoLink to the article.
categorynotextCategory name; repeatable; optional primary attribute. See Categories and the primary flag. Matched against a Categories feed's hierarchy to resolve a URL.
annotationnotextyesShort summary or excerpt; HTML allowed (wrap in CDATA). Indexed and returned as the result's annotation.
image_link_snotextnoSmall image URL.
image_link_mnotextnoMedium image URL.
image_link_lnotextnoLarge image URL.