Gravatar for sfreeman@mathematica-mpr.com

Question by fozapd, Jun 18, 2018 5:50 PM

Coveo for Sitecore preselected facets

My site has some scenarios where we want to take the user to a search page but already have one of the facet values selected. I've seen different responses to this question so I'm hoping to get a definitive answer for 'Coveo for Sitecore 4.1'

Example: Staff search page

In one case, we want to only show Senior Staff members (preselected). Tried to grab the URL:

https://mydomain/coveosearch/staff#sort=relevancy&f:Staff%20Position=[Senior%20Staff]&f:Staff%20Position:operator=and

However, Coveo seems to drop the facet values and goes back to the default all results URL.

https://mydomain/coveosearch/staff#sort=relevancy

Is this easily achieved? This is something that worked with GSA so hoping that it can work out of the box.

Gravatar for flguillemette@coveo.com

Comment by François Lachance-Guillemette, Jun 18, 2018 5:58 PM

This should work.

I have tried with the latest version and it works as expected, with the following `&f:templatename=[Sample%20Item]`

Can you try to check this facet and simply refresh your page to see what happens?

I suspect there is something on the page messing with the hash part of the URL.

1 Reply
Gravatar for sfreeman@mathematica-mpr.com

Answer by fozapd, Jun 18, 2018 6:57 PM

So I tried it with a Facet that had no spaces in the name and it appears to work. The problem seems to be with Facets that have spaces in the name. Ex: &f:Type:[Some%20Value] works. &Staff%20Position=[Senior%20Staff]

For this URL: https://mydomain/coveosearch/allcontent#sort=relevancy&f:Type=[News%20Article]&f:Focus%20Area=[Education]&f:Focus%20Area:operator=and

It comes back with https://mydomain/coveosearch/allcontent#sort=relevancy&f:Type=[News%20Article]

Gravatar for sfreeman@mathematica-mpr.com

Comment by fozapd, Jun 18, 2018 7:07 PM

Facet names with spaces were the issue. While it worked once on the page, the parameters would get stripped from hash when passed in as a starting URL. I imagine the underlying issue was that it couldn't match the name up so it throw out the parameter as invalid. A quick pass through of my Facets in Sitecore to modify the Facet Names to remove the spaces quickly resolved the issue!

Gravatar for info@eat-sleep-code.com

Comment by eat-sleep-code.com, Apr 4, 2019 7:20 PM

Was this ever fixed? I am seeing it in the build we have installed.

Gravatar for info@eat-sleep-code.com

Comment by eat-sleep-code.com, Apr 5, 2019 9:31 PM

What version of Coveo for Sitecore was that upgraded in? And is there a way to update it in Sitecore without doing a full Coveo update?

Gravatar for info@eat-sleep-code.com

Comment by eat-sleep-code.com, Apr 8, 2019 4:52 PM

Any specific file I would need to copy?

Gravatar for info@eat-sleep-code.com

Comment by eat-sleep-code.com, Apr 10, 2019 11:41 PM

Is there a specific source files? I tried the Sitecore source package but they have the GUIDs in each of the file names.

Gravatar for info@eat-sleep-code.com

Comment by eat-sleep-code.com, Apr 11, 2019 4:33 PM

But inside the Sitecore installer, they all have guids in the file names .. AnalyticsSuggestions.min__ad15ac93215dbe6fd809. So where is a source of the Coveo/Hive file that just has the real file names (without the guids).

Ask a question