Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chris Townsend 3 posts 73 karma points
    Mar 22, 2018 @ 15:35
    Chris Townsend
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft