Coder Social home page Coder Social logo

sitecore.algolia's Issues

Indexer should only sent in CD instance only

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

Implement AlgoliaBaseIndex.EnableFieldLanguageFallback

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)

Reference Computed field

Reference Fields store item Id(s). Algolis need to have names.

Success criteria:

  1. Field name is selectable

  2. By Default return Item name/dispaly name

  3. Return Array for multi select

  4. Allow to pick reference item field that will be used instead of "Display name"

Document crawling fails if Computed field name duplicates Item field 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, CrawlState1 state)

indexer is sent old items

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.

Crawling fails if document is bigger than current quote

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.List1.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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.