Gravatar for jhansen@singlestoneconsulting.com

Question by Jeff Hansen, May 15, 2015 2:46 PM

Limiting fields returned by query

Hi,

Is there anything that I can pass in my query to specify which fields I want returned in the search results? There are some fields being returned that we may not want anyone hitting the page to have access to, such as the id of the Sitecore user who created the item.

Thanks,

Jeff

2 Replies
Gravatar for vseguin@coveo.com

Answer by Vincent Séguin, May 15, 2015 2:49 PM

Hi Jeff,

You could implement a processor for the coveoProcessParsedRestResponse pipeline and strip out the fields, just as described here : https://developers.coveo.com/display/public/SC201504/Altering+Search+Results+Before+They+Are+Displayed+in+a+Search+Interface,

Thank you

Gravatar for jhansen@singlestoneconsulting.com

Comment by Jeff Hansen, May 15, 2015 2:57 PM

Thank you!

Gravatar for lbergeron@coveo.com

Answer by Luc Bergeron, May 15, 2015 2:51 PM

Hi,

You can add a custom processor to the "coveoProcessParsedRestResponse" pipeline to achieve that. Here is an example explaining how to do it.

I hope this helps

Gravatar for jhansen@singlestoneconsulting.com

Comment by Jeff Hansen, May 15, 2015 2:57 PM

Thanks for the response! I marked Vincent's as the accepted answer just because he posted his reply first, but I appreciate the link!

Ask a question