Gravatar for

Question by qch1595, Jan 18, 2017 3:42 PM

Coveo indexes external database in Sitecore 8

I have Coveo 4.0 installed with Sitecore 8.2 website. By default, it created a Sitecore Search Provider collection with 2 sources(Coveomasterindex-servername-applicationname and Coveowebindex-servername-applicationname) inside. Then, I manually added the 3rd source called "External_DB" connects to a SQLServer database to grab some sample data and indexed by Coveo. Everything works well so far.

After creating a Coveo search sample page in Sitecore, I can search everything within Sitecore website.

The question is: how do I make the data from the SQLServer searchable in Sitecore website? I only see the 2 sources available in Sitecore index manager: Coveomasterindex-xxxx and Coveowebindex-xxxx)


1 Reply
Gravatar for

Answer by amoreau, Jan 18, 2017 3:56 PM


I think you should follow this documentation:

By default, Coveo for Sitecore only displays items from your Sitecore instance, but it is easy to change that.

Since you are working with 8.2, however, there is a bug with the Rule Editor in the Experience Editor (only available with Enterprise and Enterprise Cloud). In that case, you should modify the rule by going to Presentation > Details.

Let me know if it works! :)


Gravatar for

Comment by qch1595, Jan 19, 2017 8:34 AM

Hi Alex, Thanks for your quick response. I followed the tutorial on the link you sent. I created a new collection and a new source pointing to Sitecore Experience Platform page and set the proper permissions. It looks good in CES. Then I followed the link to add the new external source to my Sitecore search page. After I clicked Ok, the page refreshed without the new source data.

Maybe I missed something? Thanks, Greg

Gravatar for

Comment by amoreau, Jan 19, 2017 9:45 AM

Yes, that is a behaviour that I've noticed happens as well sometimes, although most of the time it updates automatically on my side.

After having saved the page and reaccessed it via Preview, did you notice your external source appear?

If it still does not work and you have followed the documentation, I am not sure what the issue is, as I've tested this documentation quite a few times without hiccups.

Could you give me which release of Coveo for Sitecore 4.0 you are using? That could help me figure out if there is something more at play here.

Gravatar for

Comment by qch1595, Jan 19, 2017 10:45 AM


After trying it a few times, it shows my external data. But when I tried to save it, it gave me an error. Please see the log below.

Versions I installed:

  • CES: Coveo Enterprise Search 7.0 x64 (8691) for Sitecore
  • Search API: Coveo Search API 8.0.1130
  • Package: Coveo for Sitecore 82 4.0 (780)


13380 09:36:42 ERROR After parsing a value an unexpected character was encountered: {. Path 'scLayout', line 2, position 14.
Exception: Newtonsoft.Json.JsonReaderException
Message: After parsing a value an unexpected character was encountered: {. Path 'scLayout', line 2, position 14.
Source: Newtonsoft.Json
  at Newtonsoft.Json.JsonTextReader.ParsePostValue()
  at Newtonsoft.Json.JsonTextReader.ReadInternal()
  at Newtonsoft.Json.JsonTextReader.Read()
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
  at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
  at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
  at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
  at Sitecore.ExperienceEditor.Speak.Server.Requests.PipelineProcessorRequest`1.Process(RequestArgs requestArgs)
Gravatar for

Comment by qch1595, Jan 19, 2017 10:55 AM


I found the issue is in Sitecore. Looks like Sitecore doesn't like the Rules in Coveo search pages. How can I save it without the Rules? Looks like a dead end?


The problem is caused by an issue in Sitecore. This problem does not affect only the Coveo Search components; every Sitecore component with a field of type Rules will generate this error.


Edit the Coveo Search pages using the Content Editor (Presentation -> Details). The Content Editor is not affected by this issue.

It is also possible to save the page in the Experience Editor after removing all the rules.

Gravatar for

Comment by amoreau, Jan 19, 2017 11:06 AM

Yes, that's the way you should fix it.

The issue is that you cannot save the rules in the Experience Editor, but you can still access the component.

In the Content Editor, select the Presentation tab, and select Details. Then, select the Coveo Search component, and edit your properties there. Since you are outside of the Experience Editor, you will be able to save the component even with rules.

Gravatar for

Comment by qch1595, Jan 19, 2017 11:18 AM

Thank you! It worked.

Ask a question