Gravatar for debadyuti.sil@gmail.com

Question by Deb, Aug 3, 2015 3:10 PM

How to get excerpt data in rest api call?

I am getting " " excerpt value in coveo response .Can anyone help me to get data in excerpt so that i can display search result properly without using template..Any help will be appreciated.

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Aug 3, 2015 3:33 PM

It would help to know which kind of documents you have in your results and the exact product you are using. It is with Coveo for Sitecore?

Gravatar for debadyuti.sil@gmail.com

Comment by Deb, Aug 3, 2015 3:39 PM

We have integrated Coveo with Salesforce knowledge articles.Coveo provided package and we installed it.We are customizing using rest api call and not using coveo provided template.So while displaying article summary in search result we need to use excerpt.

1 Reply
Gravatar for jfcadrin@coveo.com

Answer by JFCG, Aug 4, 2015 9:32 AM

You mean that the excerpt is empty in the JSON response, right?

"Title" : "TITLE",
    "Uri" : "http://1234",
    "PrintableUri" : "http://abc",
    "ClickUri" : "https://xyz",
    "UniqueId" : "UNIQUE ID",
    "Excerpt" : " ".",          <=== THIS?

This may not be a matter of getting the data from the API, per se.

The Excerpt is actually generated at query-time by an algorithm, according to the search terms, from a selection of "excerpt sentences" that are selected from the document's body and stored with each item in the index.

Maybe there is no body on the on the documents matching your query? Have you checked the matching documents in either your Content Browser or Index Browser (I don't know if you use a Cloud or on-premise index)? Perhaps the documents are indexed by reference, for instance. The mapping for the Knowledge articles could also be missing a body mapping.

Just a few ideas off of the top of my head and which I hope will help.

Gravatar for debadyuti.sil@gmail.com

Comment by Deb, Aug 11, 2015 8:28 AM

I am getting Excerpt for Salesforce Article Summary Field which is a text area. I have created a rich text custom field and i want to populate Excerpt based on this custom field data.Do i need to configure anywhere?Any help will be helpful.

Ask a question