Gravatar for sal.salvador@meau.com

Question by salpsx, Aug 13, 2015 6:07 PM

Summary under Detail Link in Javascript Framework

We are trying to mimic in Search.cshtml the ability to view a document's summary similar to how it is displayed in the original Coveo skin results (Details link -> Summary Tab). We do not see any fields that contain this information. Is this possible?

1 Reply
Gravatar for colema18@gmail.com

Answer by colema18, Aug 14, 2015 2:01 PM

I think this should work. You might want to do an if summary is null use FirstSentences. I suggest using F12 in Chrome and view the Rest Response and then you can see the fields that are available to you for use.

{{= FirstSentences }}
Gravatar for colema18@gmail.com

Comment by colema18, Aug 14, 2015 2:14 PM

One question I do have though while looking more into this question is in my REST results the "summary" field always shows as null but if I look at the same document in the CES backend I see that the Summary field is populated. Maybe someone from Coveo or the community can tell us how to make the REST service return the summary field so it can be leveraged.

Gravatar for slangevin@coveo.com

Comment by Simon, Sep 10, 2015 2:51 PM

It should be there by default, it's an attribute of the Query result object : https://developers.coveo.com/display/public/SearchREST/Query+Results

If you have it in the back-end but not on your interface, it could be a document permission issue or even a bug. I would contact Coveo Support.

Gravatar for colema18@gmail.com

Comment by colema18, Sep 10, 2015 2:57 PM

Thanks Simon. I see the field summary that comes over but the value is always null. If I use the .net skin view summary appears for a document but it is jull through the REST response - so I guess I will submit a ticket.

Ask a question