0

I am trying to search Xdb contacts on the basis of email id.

using this code :

var queryable = client.Contacts.Where(c => c.GetFacet<EmailAddressList>(EmailAddressList.DefaultFacetKey).PreferredEmail.SmtpAddress == eloquaContact.emailAddress).WithExpandOptions(new ContactExpandOptions(EmailAddressList.DefaultFacetKey));

var enumerator = queryable.GetBatchEnumeratorSync(10);

I am getting following error on the second line :

**[XdbSearchUnavailableException: The HTTP response was not successful: InternalServerError]**
   Sitecore.Xdb.Common.Web.Synchronous.SynchronousExtensions.SuspendContextLock(Func`1 taskFactory) +653
   Sitecore.XConnect.Client.XConnectSynchronousExtensions.SuspendContextLock(Func`1 taskFactory) +61
   Sitecore.XConnect.Client.XConnectSynchronousExtensions.GetBatchEnumeratorSync(IAsyncQueryable`1 asyncQueryable) +154
   EloquaSitecoreConnector.Services.XDbService.CreateEloquaContactsInXDb() in E:\EloquaSitecoreConnector\EloquaSitecoreConnector\Services\xDBService.cs:146

XConnect Stack Trace:

2020-01-13 06:18:38.458 -05:00 [Error] Sitecore.XConnect.Operations.XdbSearchOperation`1[Sitecore.XConnect.Contact]: System.TimeoutException: A wait for data to be indexed has been timed out. 2020-01-13 06:18:38.458 -05:00 [Error] ["XdbContextLoggingPlugin"] XdbContext Batch Execution Exception System.TimeoutException: A wait for data to be indexed has been timed out.

Can anyone tell how to resolve this?

P.S : I have already rebuild the XConnect Search Index and made PII Sensitive Data Indexing "true".

  • Are there any logged exceptions on the xConnect side that is receiving the request? – Jason St-Cyr Jan 7 at 12:44
  • Look in xconnect logs and see if it gives some hints. Your linq looks fine. – Chris Auer Jan 7 at 14:30
  • That's the client log, you need the xconnect server log – Mark Gibbons Jan 9 at 3:41
  • 2020-01-13 06:18:38.458 -05:00 [Error] Sitecore.XConnect.Operations.XdbSearchOperation`1[Sitecore.XConnect.Contact]: System.TimeoutException: A wait for data to be indexed has been timed out. 2020-01-13 06:18:38.458 -05:00 [Error] ["XdbContextLoggingPlugin"] XdbContext Batch Execution Exception System.TimeoutException: A wait for data to be indexed has been timed out. – Gautam Aneja Jan 13 at 11:22
  • I have attached the XConnect Log Trace @JasonSt-Cyr – Gautam Aneja Jan 13 at 11:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.