dharnitski / sitecore.algolia Goto Github PK
View Code? Open in Web Editor NEWSitecore search provider for Algolia
License: MIT License
Sitecore search provider for Algolia
License: MIT License
I have this Sitecore Instance Configuration
CD Instance for content delivery
CM Instance for content management, all of the sitecore's shell must always from this instance.
CD Instance have internet access to public
CM Instance have only intranet to access databases
We use index remoteBuild strategy to perform remote build, in other words whenever CM instance invoke build index, any other CD instances will perform build similar index.
For Sitecore.Algolia, I cannot find any config to limit updating index to algolia-api {api-id}--1.algolianet.com etc in CD Instance only, this causing error could not access algolia-api-url in CM instance
Edit:
This feature might be resolved by removing algolia's configurations in CM side, but still that way webmaster will not know there are algolia index in CD side
ManagedPoolThread #9 15:46:51 FATAL Could not add field {3749597E-F34D-4096-831E-1DBAC7181FD7} : cascaded placeholders for indexable sitecore://master/{845E7A47-0D93-4BC4-8D16-FE837D15D92E}?lang=en&ver=1
Exception: System.NotImplementedException
Message: The method or operation is not implemented.
Source: Score.ContentSearch.Algolia
at Score.ContentSearch.Algolia.AlgoliaBaseIndex.get_EnableFieldLanguageFallback()
at Sitecore.ContentSearch.AbstractDocumentBuilder`1.CheckAndAddField(IIndexable indexable, IIndexableDataField field)
Template name should be included by default. template Id should be optional.
Reference Fields store item Id(s). Algolis need to have names.
Success criteria:
Field name is selectable
By Default return Item name/dispaly name
Return Array for multi select
Allow to pick reference item field that will be used instead of "Display name"
ManagedPoolThread #6 15:27:29 WARN Crawler : AddRecursive DoItemAdd failed - {0C879602-EF9A-4B0F-B992-08F923F7AA90}
Exception: System.ArgumentException
Message: Can not add property professions to Newtonsoft.Json.Linq.JObject. Property with the same name already exists on object.
Source: Newtonsoft.Json
at Newtonsoft.Json.Linq.JObject.ValidateToken(JToken o, JToken existing)
at Newtonsoft.Json.Linq.JContainer.InsertItem(Int32 index, JToken item, Boolean skipParentCheck)
at Newtonsoft.Json.Linq.JContainer.AddInternal(Int32 index, Object content, Boolean skipParentCheck)
at Score.ContentSearch.Algolia.AlgoliaDocumentBuilder.AddFieldAsEnumarable(String fieldName, Object fieldValue, Boolean append)
at Score.ContentSearch.Algolia.AlgoliaDocumentBuilder.AddField(String fieldName, Object fieldValue, Boolean append)
at Score.ContentSearch.Algolia.AlgoliaDocumentBuilder.AddComputedIndexFields()
at Score.ContentSearch.Algolia.AlgoliaIndexOperations.GetIndexData(IIndexable indexable, IProviderUpdateContext context)
at Score.ContentSearch.Algolia.AlgoliaIndexOperations.Add(IIndexable indexable, IProviderUpdateContext context, ProviderIndexConfiguration indexConfiguration)
at Sitecore.ContentSearch.SitecoreItemCrawler.DoAdd(IProviderUpdateContext context, SitecoreIndexableItem indexable)
at Sitecore.ContentSearch.HierarchicalDataCrawler1.CrawlItem(T indexable, IProviderUpdateContext context, CrawlState
1 state)
When using a onPublishEndAsync strategy after I publish an item it gets updated correctly in Algolia. Then after I publish another item both ids are sent to Update on line 193 in AlgoliaBaseIndex.cs. In the var indexableUniqueIds. It looks like they're both updated in Algolia. We have a lot of publishing so this gets out of hand quickly.
I tried to step through and debug. From what I can tell the Update function gets called from Sitecore so that function needs to check if an item was not send to Algolia yet. I looked in the history table and the timestamps are being updated correctly so I'm surprised the IDs are being sent to the function at all.
I'm on Sitecore.NET 8.2 (rev. 160729).
Thanks for any help.
Job started: Index_Update_IndexName=algolia_test|#Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AggregateException: One or more errors occurred. ---> Algolia.Search.AlgoliaException: Record at the position 77 objectID=en_98774257-1d24-444f-b482-543ad3408e1c is too big size=445709 bytes. Contact us if you need an extended quota
at Algolia.Search.AlgoliaClient.d__58.MoveNext() in C:\prog\gitHub\sitecore-algolia\Algolia.Search\AlgoliaClient.cs:line 894
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Score.ContentSearch.Algolia.AlgoliaUpdateContext.b__6_1(IEnumerable1 chunk) in C:\prog\gitHub\sitecore-algolia\Score.ContentSearch.Algolia\AlgoliaUpdateContext.cs:line 61 at System.Collections.Generic.List
1.ForEach(Action`1 action)
at Score.ContentSearch.Algolia.AlgoliaUpdateContext.Commit() in C:\prog\gitHub\sitecore-algolia\Score.ContentSearch.Algolia\AlgoliaUpdateContext.cs:line 62
at Score.ContentSearch.Algolia.AlgoliaBaseIndex.DoRebuild(IProviderUpdateContext context, IndexingOptions indexingOptions, CancellationToken cancellationToken) in C:\prog\gitHub\sitecore-algolia\Score.ContentSearch.Algolia\AlgoliaBaseIndex.cs:line 140
at Score.ContentSearch.Algolia.AlgoliaBaseIndex.PerformRebuild(IndexingOptions indexingOptions, CancellationToken cancellationToken) in C:\prog\gitHub\sitecore-algolia\Score.ContentSearch.Algolia\AlgoliaBaseIndex.cs:line 93
at Score.ContentSearch.Algolia.AlgoliaBaseIndex.Rebuild(IndexingOptions indexingOptions) in C:\prog\gitHub\sitecore-algolia\Score.ContentSearch.Algolia\AlgoliaBaseIndex.cs:line 119
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj)
at Sitecore.Jobs.JobRunner.RunMethod(JobArgs args)
at (Object , Object[] )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Jobs.Job.ThreadEntry(Object state)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.