AI OnAI Off
Hi Toni,
Seems that you have run into this bug. This bug is fixed and will be included in the next patch for Find. If you have a more critical use for the bugfix you should contact Developer support and then they can provide you with a version of find that includes this fix.
I have a Finnish EPiServer 7 site and a Finnish EPiServer Find index. When I run the indexing service, the status says "OK", but I get the following errors:
----------------
Indexing job [xxxxxx] [Page]: Reindexing completed.
ExecutionTime: 0minutes 1seconds
Number of pages indexed: 258
Number of page errors: 0
Number of batch errors: 3
An exception occured while indexing (Batch): An item with the same key has already been added.. (see log for more information)
An exception occured while indexing (Batch): An item with the same key has already been added.. (see log for more information)
An exception occured while indexing (Batch): An item with the same key has already been added.. (see log for more information)
Indexing job [xxxxx] [File]: Reindexing completed.
ExecutionTime: 0minutes 0seconds
Number of files indexed: 0
EPiServer.Find.Cms.FileIndexer+ReIndexResult
---------------
Error log shows the following information:
----------------
2013-09-19 13:18:16,256 [132] ERROR EPiServer.Find.Cms.ContentIndexer: An exception occured while indexing (Batch): An item with the same key has already been added..
System.ArgumentException: An item with the same key has already been added.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at EPiServer.Find.Cms.ContentExtensions.PublishedInLanguage(IContent content)
at EPiServer.Find.DelegateValueProvider`2.GetValue(Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value)
at EPiServer.Find.Api.BulkActionConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value)
at EPiServer.Find.Json.Serializer.SerializeToStringBuilder(JsonSerializer serializer, Object value, StringBuilder buffer)
at EPiServer.Find.Api.BulkCommand.Execute()
at EPiServer.Find.Client.Index(IEnumerable objectsToIndex)
at EPiServer.Find.Cms.ContentIndexer.Index(IEnumerable`1 content, IndexOptions options)
at EPiServer.Find.Cms.ContentIndexer.ReIndex(Action`1 statusAction, Func`1 isStopped)
2013-09-19 13:18:16,552 [132] ERROR EPiServer.Find.Cms.ContentIndexer: An exception occured while indexing (Batch): An item with the same key has already been added..
System.ArgumentException: An item with the same key has already been added.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at EPiServer.Find.Cms.ContentExtensions.PublishedInLanguage(IContent content)
at EPiServer.Find.DelegateValueProvider`2.GetValue(Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value)
at EPiServer.Find.Api.BulkActionConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value)
at EPiServer.Find.Json.Serializer.SerializeToStringBuilder(JsonSerializer serializer, Object value, StringBuilder buffer)
at EPiServer.Find.Api.BulkCommand.Execute()
at EPiServer.Find.Client.Index(IEnumerable objectsToIndex)
at EPiServer.Find.Cms.ContentIndexer.Index(IEnumerable`1 content, IndexOptions options)
at EPiServer.Find.Cms.ContentIndexer.ReIndex(Action`1 statusAction, Func`1 isStopped)
2013-09-19 13:18:50,732 [137] ERROR SearchSettings: Update batch could not be sent to service uri 'http://testi.xxxxx.fi/IndexingService/IndexingService.svc/update/?accesskey=local'. Message: 'Unable to connect to the remote server at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at EPiServer.Search.RequestHandler.MakeHttpRequest(String url, NamedIndexingServiceElement namedIndexingServiceElement, String method, Stream postData, Action`1 responseHandler)
at EPiServer.Search.RequestHandler.SendRequest(SyndicationFeed feed, String namedIndexingService, Collection`1 ids)'
2013-09-19 13:18:50,732 [137] ERROR SearchSettings: Send batch for named index 'serviceName' failed. Items are left in queue.
----------------
The problem is ONLY on the customer's server/site. The indexing and search works perfectly on my own development environment and our Continuous Integration server.
Another weird thing is that the indexing job indexes only English pages. The site is only in Finnish, but there accidentally were a few English pages on the site, which I eventually removed, so now there are only Finnish pages left on the site. The index is created with Finnish language only, and that is exactly what I would like to put in the index: Finnish pages only.
The front page of the site used to have an English translation, beside the Finnish version. I got rid of the English translation, thinking that this could probably correct the problem. Unfortunately it didn't.
I have disabled all other languages from the site besides Finnish. That did not help either.
I have tried disabling the globalization on the site. Did not help.
I have defined languages in the site hosts in EPiServerFramework.config:
<siteHostMapping>
<siteHosts siteId="xxxxx">
<add name="aaa.bbbb.ccc" language="fi" />
</siteHosts>
This did not help either.
Instead of language settings, could there be a problem in one of my page or block types?
Any idea what could cause the problem?
Best regards,
Toni S.