Town
Town

Reputation: 14906

Umbraco: Custom Examine index with AWS flexible load balancing on EBS

Does anyone have an example of how to get this working?

I have a custom indexer, configured in ExamineSettings.config like this:

<add name="KeywordsIndexer"
           type="Examine.LuceneEngine.Providers.SimpleDataIndexer, Examine"
           dataService="SearchIndexers.ParagraphKeywordIndexer"
           directoryFactory="Examine.LuceneEngine.Directories.TempEnvDirectoryFactory,Examine"
           indexTypes="KeywordIndexItem"/>

a search provider

<add name="KeywordsSearcher"
           indexSet="KeywordsIndexSet"
           enableLeadingWildcards="true"
           type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine"
           analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net" />

and an index set, in ExamineIndex.config

<IndexSet SetName="KeywordsIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/Keywords/" IndexParentId="1119">
    <IndexUserFields>
      <add Name="ParagraphId" />
      <add Name="ArticleId" />
      <add Name="ChapterId" />
      <add Name="Keywords1" />
      <add Name="Keywords2" />
      <add Name="Keywords3" />
      <add Name="Keywords4" />
      <add Name="Keywords5" />
      <add Name="Keywords6" />
      <add Name="Keywords7" />
      <add Name="Keywords8" />
      <add Name="Keywords9" />
      <add Name="Keywords10" />
    </IndexUserFields>
  </IndexSet>

I then have a custom class which implements ISimpleDataService to query the content and create custom items which are inserted into the Index.

This all works fine when generating the index manually through the back-end Rebuild Index button, but I have no idea how to get this to propagate from the master machine to the slave machines (1 master, 1 slave at the moment in this setup https://aws.amazon.com/blogs/devops/run-umbraco-cms-with-flexible-load-balancing-on-aws/).

I believe I have two questions:

1) How can I get the index to automatically rebuild when content is published on the master server? (ideally only content within a specific parent/of a specific type)

2) Once rebuilt, how can I get the index to propagate to the slave machines so that the newly-rebuilt index is updated on all of them?

The docs are all Azure-specific so it's difficult to tell what is necessary and what isn't for AWS EBS. I've seen a few references to "it just works", but unfortunately that's definitely not the case in my experience so far!

Any help would be greatly appreciated.

Upvotes: 4

Views: 311

Answers (0)

Related Questions