Gravatar for carlos.cenjor@ti.eptisa.com

Question by carlos.cenjor, Apr 12, 2018 9:37 AM

Cloud V2 - Search API - XML Response and Metadata (Fields)

Hi,

we are migrating some clients from Google Search Appliance and currently they are familiar to XSL transformations using XSL templates to transform XML results to HTML.

So that we are investigating about the possibilities of Coveo Search API using opensearch-rss or opensearch-atom.

I would like to know if there is a place in documentation about this kind of responses.

Besides I would like to know if can be retrieved document/url metadata with this kind of response.

Thank you!

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Apr 13, 2018 12:41 AM

The Coveo Search API always returns search results in a JSON format. There is no possibility to have an XML format. The Coveo Search API is engineered to work very well with the Coveo JavaScript Search Framework that is for the search UI.

For the second part of your question about document/url metadata, could you please post a separate question with more context? We try to keep one question per topic as there can be only one accepted answer. Thanks.

1 Reply
Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, Apr 13, 2018 10:18 AM

Hi,

First, I want to apologize for my previous answer saying it was impossible to get search results in an XML format from the Coveo Search API. Your comment made me double check my facts and I found out the option you are talking about. Thanks for pointing it out to me.

XML formatting of the search results in RSS or ATOM format seems to have been implemented only for the Search Alerts feature to consume a feed of search results and send emails when there are new results. It does not seem possible to get the field values and other properties from the search results using this formatting option. Here is the only information returned for search results:

ATOM

<entry>
  <source>
    <title>Habitat</title>
  </source>
  <title>- Habitat Sitecore Framework Rammer</title>
  <id>http://habitat.demo.sitecore.net/da/modules/feature/person/employees%20list/john%20howard/</id>
  <link href="http://habitat.demo.sitecore.net/da/modules/feature/person/employees%20list/john%20howard/"/>
  <summary>Kontakt Sitecore ... Om Habitat ... Sitecore Habitat er en metode til at udvikle Sitecore løsninger. ... Example available on GitHub ... Copyright © 2015 Sitecore Corporation A/S ... 00:01</summary>
  <updated>2018-04-13T00:23:34.000Z</updated>
  <published>2018-04-13T00:23:34.000Z</published>
  <sfdc:link>/apex/CoveoV2__DocumentView?uniqueId=42.44395$http://habitat.demo.sitecore.net/da/modules/feature/person/employees%2520list/john%2520howard/&q=</sfdc:link>
</entry>

RSS

<item>
  <title>- Habitat Sitecore Framework Rammer</title>
  <link>http://habitat.demo.sitecore.net/da/modules/feature/person/employees%20list/john%20howard/</link>
  <description>Kontakt Sitecore … Om Habitat … Sitecore Habitat er en metode til at udvikle Sitecore løsninger. … Example available on GitHub … Copyright © 2015 Sitecore Corporation A/S … 00:01</description>
  <guid>42.44395$http://habitat.demo.sitecore.net/da/modules/feature/person/employees%20list/john%20howard/</guid>
  <pubDate>2018-04-13T00:23:34.000Z</pubDate>
  <source>Habitat</source>
</item>

Gravatar for carlos.cenjor@ti.eptisa.com

Comment by carlos.cenjor, Apr 13, 2018 10:22 AM

That is what I thought..

Anyway thank you for your confirmation!

Ask a question