Gravatar for

Question by mnrichardstokes, Jul 25, 2014 11:44 AM

Include external source but still filter

I will be building an Intranet for my company and will be including search results for the intranet and other external sites. I am able include the external sources but am not sure to how to both include it and set search filters for the local intranet. Is there a rule that says to include external media so I can set filters for the Sitecore data (like by template or location). We are using Coveo for Sitecore

2 Replies
Gravatar for

Answer by Vincent Séguin, Jul 25, 2014 11:58 AM


In a Coveo Search page properties, there's a field called Names of External Sources. You could simply set the name of your external source there.

Adding filtering or boosting rules will not filter on these external sources.

Gravatar for

Comment by mnrichardstokes, Jul 25, 2014 12:25 PM

Including the external source was not a problem. But when I added the filter expression rule

where the item is the Home item or one of its subitems

the external results were not included and I did not see a rule to also include them.

Gravatar for

Comment by Vincent Séguin, Jul 25, 2014 1:00 PM

On which build are you? We fixed this recently… this may be not in your build.

Gravatar for

Answer by jbachmann, Nov 19, 2014 6:21 PM

I'm actually seeing this exact same behavior even today and I'm used this package, "Coveo for Sitecore 72 3.0 (758).zip", and CES version 7.0 x64 Build 7104.0

My test is this:

  1. Create new page using the provided "Coveo Search Page (MVC)" insert option
  2. Add my external source names to the "Names of External Content Sources:" field in the Coveo Search View properties
  3. Observe that NONE of my externals are present in result set, only Sitecore items are present
  4. Remove all pre-defined "Filter expression rules:" entries; no rules remaining
  5. Observer that ALL of my externals are present in the result set, as well as my Sitecore items

If I add even a single "Filter expression rules:" entry, all of the externals are removed from the search results.

It's been driving me crazy. I thought it was 'working as intended'.

Gravatar for

Comment by Vincent Séguin, Nov 20, 2014 7:36 AM

This works as intended. Filtering on Sitecore items will filter on fields that are not present on external sources, so it excludes them. But there's a pleasant way to get out of this.

Create a Sitecore rule and add a piece like 'or where syssource equals 'myExternalSource''. The syssource field is a field present on all the Coveo documents that simply tells what is the source.

This will make sure you have BOTH your external and Sitecore elements.

Gravatar for

Comment by Vincent Séguin, Nov 20, 2014 7:43 AM

This is all documented here :

Step #3 of the 'Enabling the external source in Sitecore' section.

Gravatar for

Comment by jbachmann, Nov 20, 2014 12:21 PM

I can't count the number of times I had previously looked at that page, but every time I seem to have overlooked that REALLY important tidbit.

Thanks for pointing it out! Maybe a future version of the docs will make that section a tad more prominent.

Ask a question